unerrored / Stocks_Predictor

A program made in Python which predicts future stocks depending on the dataset the user has give.
MIT License
0 stars 0 forks source link

doesnt support .xslx #1

Closed unerrored closed 1 month ago

unerrored commented 1 month ago

to install excel module for py:

pip install openpyxl

then add a part to insert xslx files instead of csv which will be implemented:

xlsx_file = 'path_to_your_file/intraday_5min_IBM.xlsx'
data = pd.read_excel(xlsx_file, engine='openpyxl')

which then can be replaced with the csv_file or make an elif statement:

xlsx_file = 'candlestickchart/intraday_5min_IBM.xlsx'
data = pd.read_excel(xlsx_file, engine='openpyxl')

data['timestamp'] = pd.to_datetime(data['timestamp'])
data.set_index('timestamp', inplace=True)

data_for_prediction = data[['open', 'high', 'low', 'close', 'volume']]