huseinzol05 / Stock-Prediction-Models

Gathers machine learning and deep learning models for Stock forecasting including trading bots and simulations
Apache License 2.0
7.69k stars 2.74k forks source link

key error : 'Close' #50

Closed augmen closed 4 years ago

augmen commented 4 years ago

i run the agent.ipynb to train with new data and got this error :

`Traceback (most recent call last): File "/Users/swapnilbhadade/venv/lib/python3.7/site-packages/pandas/core/indexes/base.py", line 2890, in get_loc return self._engine.get_loc(key) File "pandas/_libs/index.pyx", line 107, in pandas._libs.index.IndexEngine.get_loc File "pandas/_libs/index.pyx", line 131, in pandas._libs.index.IndexEngine.get_loc File "pandas/_libs/hashtable_class_helper.pxi", line 1607, in pandas._libs.hashtable.PyObjectHashTable.get_item File "pandas/_libs/hashtable_class_helper.pxi", line 1614, in pandas._libs.hashtable.PyObjectHashTable.get_item KeyError: 'Close'

During handling of the above exception, another exception occurred:

Traceback (most recent call last): File "res.py", line 32, in parameters = [df['Close'].tolist(), df['Volume'].tolist()] File "/Users/swapnilbhadade/venv/lib/python3.7/site-packages/pandas/core/frame.py", line 2975, in getitem indexer = self.columns.get_loc(key) File "/Users/swapnilbhadade/venv/lib/python3.7/site-packages/pandas/core/indexes/base.py", line 2892, in get_loc return self._engine.get_loc(self._maybe_cast_indexer(key)) File "pandas/_libs/index.pyx", line 107, in pandas._libs.index.IndexEngine.get_loc File "pandas/_libs/index.pyx", line 131, in pandas._libs.index.IndexEngine.get_loc File "pandas/_libs/hashtable_class_helper.pxi", line 1607, in pandas._libs.hashtable.PyObjectHashTable.get_item File "pandas/_libs/hashtable_class_helper.pxi", line 1614, in pandas._libs.hashtable.PyObjectHashTable.get_item KeyError: 'Close'`

My data columns looks like this : 'Date', 'Open', 'Close', 'Volume'.

@huseinzol05 plz guide