Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Bug Report] there is a mismatch between the length of the header or column names and the actual data being read into a pandas DataFrame. This could result in some data loss or incorrect parsing of the CSV file. #20

Open
kivzark opened this issue Jul 8, 2023 · 0 comments

Comments

@kivzark
Copy link

kivzark commented Jul 8, 2023

there is a mismatch between the length of the header or column names and the actual data being read into a pandas DataFrame. This could result in some data loss or incorrect parsing of the CSV file.

Output given:
year1month10
UBER ==== https://www.alphavantage.co/query?function=TIME_SERIES_INTRADAY_EXTENDED&symbol=UBER&interval=15min&slice=year1month10&apikey=FXZ0
/Users/Grau/Desktop/trade/stocks-prediction-Machine-learning-RealTime-telegram-master/0_API_alphavantage_get_old_history.py:89: ParserWarning: Length of header or names does not match length of data. This leads to a loss of data with index_col=False.
df_a_time = pd.read_csv(io.StringIO(raw_response.text), index_col=False, sep=',')
UBER df: (2, 1)
year1month11
UBER ==== https://www.alphavantage.co/query?function=TIME_SERIES_INTRADAY_EXTENDED&symbol=UBER&interval=15min&slice=year1month11&apikey=FXZ0
Traceback (most recent call last):
File "/Users/Grau/Desktop/trade/stocks-prediction-Machine-learning-RealTime-telegram-master/0_API_alphavantage_get_old_history.py", line 89, in
df_a_time = pd.read_csv(io.StringIO(raw_response.text), index_col=False, sep=',')

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant