Вот мой код:
Код: Выделить всё
speedmat= pandas.read_pickle('../data/simulation_simple/speed_matrix_2015')
timeserie= speedmat.T.iloc[:, 0:8064]
timeserietimeserie["stamp"]=pd.to_datetime(timeserie["stamp"])
Код: Выделить всё
KeyError Traceback (most recent call last)
~\anaconda3\lib\site-packages\pandas\core\indexes\base.py in get_loc(self, key, method, tolerance)
3628 try:
-> 3629 return self._engine.get_loc(casted_key)
3630 except KeyError as err:
~\anaconda3\lib\site-packages\pandas\_libs\index.pyx in pandas._libs.index.IndexEngine.get_loc()
~\anaconda3\lib\site-packages\pandas\_libs\index.pyx in pandas._libs.index.IndexEngine.get_loc()
pandas\_libs\hashtable_class_helper.pxi in pandas._libs.hashtable.PyObjectHashTable.get_item()
pandas\_libs\hashtable_class_helper.pxi in pandas._libs.hashtable.PyObjectHashTable.get_item()
KeyError: 'stamp'
введите здесь описание изображения
Я пытался написать код
Код: Выделить всё
timeserietimeserie["stamp"]=pd.to_datetime(timeserie["stamp"])
Подробнее здесь: https://stackoverflow.com/questions/749 ... time-serie