Untitled
C:\ProgramData\anaconda3\envs\scripts\python.exe C:\Users\x528785\PycharmProjects\mars\Shocks\comprobaciones.py C:\Users\x528785\PycharmProjects\mars\Shocks\comprobaciones.py:5: DtypeWarning: Columns (519) have mixed types. Specify dtype option on import or set low_memory=False. returns_df = pd.read_csv("2025-01-03_all_returns.csv", sep=';') Traceback (most recent call last): File "C:\ProgramData\anaconda3\envs\scripts\Lib\site-packages\pandas\core\indexes\base.py", line 3805, in get_loc return self._engine.get_loc(casted_key) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "index.pyx", line 167, in pandas._libs.index.IndexEngine.get_loc File "index.pyx", line 196, in pandas._libs.index.IndexEngine.get_loc File "pandas\\_libs\\hashtable_class_helper.pxi", line 7081, in pandas._libs.hashtable.PyObjectHashTable.get_item File "pandas\\_libs\\hashtable_class_helper.pxi", line 7089, in pandas._libs.hashtable.PyObjectHashTable.get_item KeyError: 'MUREX_instrument' The above exception was the direct cause of the following exception: Traceback (most recent call last): File "C:\Users\x528785\PycharmProjects\mars\Shocks\comprobaciones.py", line 9, in <module> murex_values = set(returns_df["MUREX_instrument"].dropna().unique()) ~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^ File "C:\ProgramData\anaconda3\envs\scripts\Lib\site-packages\pandas\core\frame.py", line 4102, in __getitem__ indexer = self.columns.get_loc(key) ^^^^^^^^^^^^^^^^^^^^^^^^^ File "C:\ProgramData\anaconda3\envs\scripts\Lib\site-packages\pandas\core\indexes\base.py", line 3812, in get_loc raise KeyError(key) from err KeyError: 'MUREX_instrument' Process finished with exit code 1
Leave a Comment