-
Notifications
You must be signed in to change notification settings - Fork 202
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
Future warning in trading_ig\rest.py #330
Comments
Thanks for your interest in the project. Please provide more information: what upgrades? what versions of which libraries are you using? etc It is all documented here |
Thanks so much for your reply and for all the work done so far. You will find below the information that I hope is necessary and sufficient to produce the problem: Used versions : Python 3.10 Sources for producing a future warning : from datetime import datetime, timedelta username = "xxx" ig_service = IGService(username, password, api_key, acc_type) epic = 'IX.D.NASDAQ.IFE.IP' response = ig_service.fetch_historical_prices_by_epic_and_date_range(epic, resolution, start_date, end_date, session) |
@Leotheone thanks for the code snippet - but you missed the most important (crucial) bit of information - your pandas version. The warnings you are seeing are due to your use of Pandas 2.2.0 which was released in January 2024. That's why we ask for dependencies and their versions when creating an issue @femtotrader thanks for the clarification |
Closing, merged with #329 |
Hello,
For all intents and purposes, since the latest library version upgrades, this causes futureWarnings in fetch_historical_prices_by_epic, fetch_historical_prices_by_epic_and_num_points and fetch_historical_prices_by_epic_and_date_range
functions located in trading_ig\rest.py :
...\trading_ig\rest.py:1801: FutureWarning: Downcasting object dtype arrays on .fillna, .ffill, .bfill is deprecated and will change in a future version. Call result.infer_objects(copy=False) instead. To opt-in to the future behavior, set
pd.set_option('future.no_silent_downcasting', True)
data["prices"] = data["prices"].fillna(value=np.nan)...\trading_ig\rest.py:1823: FutureWarning: Downcasting object dtype arrays on .fillna, .ffill, .bfill is deprecated and will change in a future version. Call result.infer_objects(copy=False) instead. To opt-in to the future behavior, set
pd.set_option('future.no_silent_downcasting', True)
data["prices"] = data["prices"].fillna(value=np.nan)...\trading_ig\rest.py:1887: FutureWarning: Downcasting object dtype arrays on .fillna, .ffill, .bfill is deprecated and will change in a future version. Call result.infer_objects(copy=False) instead. To opt-in to the future behavior, set
pd.set_option('future.no_silent_downcasting', True)
data["prices"] = data["prices"].fillna(value=np.nan)Best regards
The text was updated successfully, but these errors were encountered: