Book a Demo!
CoCalc Logo Icon
StoreFeaturesDocsShareSupportNewsAboutPoliciesSign UpSign In
Download

GEP475GROUPINEEDANAP

2890 views
Kernel: Python 2 (SageMath)

Wednesday Jan 18th 2017

import pandas as pd
netatmo = pd.read_csv('Jan18th2017.csv', parse_dates=True, index_col=1)
--------------------------------------------------------------------------- IOError Traceback (most recent call last) <ipython-input-2-e7b785cd79de> in <module>() ----> 1 netatmo = pd.read_csv('Jan18th2017.csv', parse_dates=True, index_col=1) /ext/sage/sage-8.1/local/lib/python2.7/site-packages/pandas/io/parsers.pyc 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) 703 skip_blank_lines=skip_blank_lines) 704 --> 705 return _read(filepath_or_buffer, kwds) 706 707 parser_f.__name__ = name /ext/sage/sage-8.1/local/lib/python2.7/site-packages/pandas/io/parsers.pyc in _read(filepath_or_buffer, kwds) 443 444 # Create the parser. --> 445 parser = TextFileReader(filepath_or_buffer, **kwds) 446 447 if chunksize or iterator: /ext/sage/sage-8.1/local/lib/python2.7/site-packages/pandas/io/parsers.pyc in __init__(self, f, engine, **kwds) 812 self.options['has_index_names'] = kwds['has_index_names'] 813 --> 814 self._make_engine(self.engine) 815 816 def close(self): /ext/sage/sage-8.1/local/lib/python2.7/site-packages/pandas/io/parsers.pyc in _make_engine(self, engine) 1043 def _make_engine(self, engine='c'): 1044 if engine == 'c': -> 1045 self._engine = CParserWrapper(self.f, **self.options) 1046 else: 1047 if engine == 'python': /ext/sage/sage-8.1/local/lib/python2.7/site-packages/pandas/io/parsers.pyc in __init__(self, src, **kwds) 1682 kwds['allow_leading_cols'] = self.index_col is not False 1683 -> 1684 self._reader = parsers.TextReader(src, **kwds) 1685 1686 # XXX pandas/_libs/parsers.pyx in pandas._libs.parsers.TextReader.__cinit__() pandas/_libs/parsers.pyx in pandas._libs.parsers.TextReader._setup_parser_source() IOError: File Jan18th2017.csv does not exist
netatmo.columns
%matplotlib inline netatmo['CO2'].plot()
time2 = '2017-01-25 18:09:00' time1 = '2017-01-25 19:09:00' data[time1:time2]

Wednesday Jan 25th 2017

netatmo2 = pd.read_csv('Jan25th2017.csv', parse_dates=True, index_col=1)
netatmo2.columns
%matplotlib inline netatmo2['CO2'].plot()

Wednesday Feb. 8th 2017

netatmo3 = pd.read_csv('Feb8th2017.csv', parse_dates=True, index_col=1)
netatmo2.columns
%matplotlib inline netatmo3['CO2'].plot()
%matplotlib inline import matplotlib.pyplot as plt import numpy as np import pandas as pd data = pd.read_csv('NetAtmo2017.csv', index_col=1, parse_dates=True) data[:]
time2 = '2017-01-25 18:09:00' time1 = '2017-01-25 19:09:00' data[time1:time2]