alphaville76 / sharadar_db_bundle

10 stars 8 forks source link

Pandas.DataFrame.append method is deprecated #58

Open mbecker8600 opened 4 months ago

mbecker8600 commented 4 months ago

https://github.com/alphaville76/sharadar_db_bundle/blob/6c55667016a45ea2ecff4c4c06d7daae4243985a/sharadar/loaders/ingest_sharadar.py#L147

I think we need to make sure that we migrate the .append() method to .concat() as per the documentation here: https://pandas.pydata.org/pandas-docs/version/1.5/reference/api/pandas.DataFrame.append.html

When running this code with Pandas 2.0+, I was seeing issues when trying to use this library. See Stack Overflow message here for more context: https://stackoverflow.com/questions/75956209/error-dataframe-object-has-no-attribute-append

alphaville76 commented 3 weeks ago

'2024-05-24T00:00:00.000000000' '2024-05-28T00:00:00.000000000']. [2024-06-09 17:01:34] ERROR: Traceback (most recent call last): File "/home/costantino/zipline-reloaded-venv3.9/lib/python3.9/site-packages/sharadar/loaders/ingest_sharadar.py", line 359, in ingest _ingest(start_date, calendar) File "/home/costantino/zipline-reloaded-venv3.9/lib/python3.9/site-packages/sharadar/loaders/ingest_sharadar.py", line 198, in _ingest equities_df = create_equities_df(prices_df, tickers, sessions, sharadar_metadata_df, show_progress=True) File "/home/costantino/zipline-reloaded-venv3.9/lib/python3.9/site-packages/sharadar/loaders/ingest_sharadar.py", line 327, in create_equities_df synch_to_calendar(sessions, start_date_df, end_date_df, df_ticker, df) File "/home/costantino/zipline-reloaded-venv3.9/lib/python3.9/site-packages/sharadar/loaders/ingest_sharadar.py", line 147, in synch_to_calendar df.append(df_ticker_synch) File "/home/costantino/zipline-reloaded-venv3.9/lib64/python3.9/site-packages/pandas/core/generic.py", line 6204, in getattr return object.getattribute(self, name) AttributeError: 'DataFrame' object has no attribute 'append'