Contact
CoCalc Logo Icon
StoreFeaturesDocsShareSupport News AboutSign UpSign In
| Download

GEP475GROUPINEEDANAP

Views: 1461
Kernel: Python 3 (Anaconda)
import pandas as pd
df1 = pd.read_csv('NetAtmo_2016.csv', parse_dates = True,)
--------------------------------------------------------------------------- FileNotFoundError Traceback (most recent call last) <ipython-input-2-466bf4ce0448> in <module>() ----> 1 df1 = pd.read_csv('NetAtmo_2016.csv', parse_dates = True,) /ext/anaconda3/lib/python3.5/site-packages/pandas/io/parsers.py in parser_f(filepath_or_buffer, sep, delimiter, header, names, index_col, usecols, squeeze, prefix, mangle_dupe_cols, dtype, engine, converters, true_values, false_values, skipinitialspace, skiprows, nrows, na_values, keep_default_na, na_filter, verbose, skip_blank_lines, parse_dates, infer_datetime_format, keep_date_col, date_parser, dayfirst, iterator, chunksize, compression, thousands, decimal, lineterminator, quotechar, quoting, escapechar, comment, encoding, dialect, tupleize_cols, error_bad_lines, warn_bad_lines, skipfooter, skip_footer, doublequote, delim_whitespace, as_recarray, compact_ints, use_unsigned, low_memory, buffer_lines, memory_map, float_precision) 707 skip_blank_lines=skip_blank_lines) 708 --> 709 return _read(filepath_or_buffer, kwds) 710 711 parser_f.__name__ = name /ext/anaconda3/lib/python3.5/site-packages/pandas/io/parsers.py in _read(filepath_or_buffer, kwds) 447 448 # Create the parser. --> 449 parser = TextFileReader(filepath_or_buffer, **kwds) 450 451 if chunksize or iterator: /ext/anaconda3/lib/python3.5/site-packages/pandas/io/parsers.py in __init__(self, f, engine, **kwds) 816 self.options['has_index_names'] = kwds['has_index_names'] 817 --> 818 self._make_engine(self.engine) 819 820 def close(self): /ext/anaconda3/lib/python3.5/site-packages/pandas/io/parsers.py in _make_engine(self, engine) 1047 def _make_engine(self, engine='c'): 1048 if engine == 'c': -> 1049 self._engine = CParserWrapper(self.f, **self.options) 1050 else: 1051 if engine == 'python': /ext/anaconda3/lib/python3.5/site-packages/pandas/io/parsers.py in __init__(self, src, **kwds) 1693 kwds['allow_leading_cols'] = self.index_col is not False 1694 -> 1695 self._reader = parsers.TextReader(src, **kwds) 1696 1697 # XXX pandas/_libs/parsers.pyx in pandas._libs.parsers.TextReader.__cinit__() pandas/_libs/parsers.pyx in pandas._libs.parsers.TextReader._setup_parser_source() FileNotFoundError: File b'NetAtmo_2016.csv' does not exist
df2 = pd.read_csv('NetAtmo_2017.csv', parse_dates = True)
df1.head(1)
df2.head(1)
df1['Time'] = df1['Timezone : America/Los_Angeles'] df1.head(1)
df1.drop(df1.columns[[0,1,2,3,5,6]], axis =1, inplace = True) df1.head(1)
df2.drop(df2.columns[[0,2,3,5,6]], axis =1, inplace = True) df2.head(1)
#df1['Time'] = pd.to_datetime(df1.Time)
#df2['Time'] = pd.to_datetime(df2.Time)
df1.head(1)
df2.head(2)
#df1.set_index('Time', inplace = True)
#df2.set_index('Time', inplace = True)
df1.head(1)
df2.head(1)
df3 = pd.concat([df1,df2])
df3.head()
df3.tail()
df3.dropna(how ='any', inplace = True)
df3.describe()
df3.reset_index()
df3.to_csv('InfiltrationCleanedData.csv')