-
Notifications
You must be signed in to change notification settings - Fork 141
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
Pandas 2.2.0 giving warnings in __init__.py and ticker.py #263
Comments
chfiii
changed the title
Pandas 2.2.0 giving warings in __init__.py
Pandas 2.2.0 giving warnings in __init__.py
Feb 2, 2024
chfiii
changed the title
Pandas 2.2.0 giving warnings in __init__.py
Pandas 2.2.0 giving warnings in __init__.py and ticker.py
Feb 2, 2024
This would be fixed by PR #262 |
Excellent. Thanks for getting it done so quickly. Sent from my iPhoneOn Feb 3, 2024, at 6:24 PM, Marcus Read ***@***.***> wrote:
This would be fixed by PR #262
—Reply to this email directly, view it on GitHub, or unsubscribe.You are receiving this because you authored the thread.Message ID: ***@***.***>
|
It is now August 18th. The fix for the Pandas warnings in PR #262 has not yet been released. When will this happen? |
m1pro
added a commit
to m1pro/yahooquery
that referenced
this issue
Sep 24, 2024
Main repo is not active in updating the PR to fix the above. Fix in fork.
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Describe the bug
Pandas 2.2.0 is giving the warning:
/yahooquery/utils/init.py:1470: FutureWarning: 'S' is deprecated and will be removed in a future version. Please use 's' instead of 'S'.
has_live_indice = index_utc[-1] >= last_trade - pd.Timedelta(2, "S")
Also getting waning in ticker.py:11333 and 1335:
ticker.py:1335: FutureWarning: A value is trying to be set on a copy of a DataFrame or Series through chained assignment using an inplace method.
The behavior will change in pandas 3.0. This inplace method will never work because the intermediate object on which we are setting values always behaves as a copy.
For example, when doing 'df[col].method(value, inplace=True)', try using 'df.method({col: value}, inplace=True)' or df[col] = df[col].method(value) instead, to perform the operation inplace on the original object.
df["splits"].fillna(0, inplace=True)
To Reproduce
Steps to reproduce the behavior:
Here's the test code:
from yahooquery import Ticker
tic = Ticker('AAPL')
history = tic.history(period='1day')
Expected behavior
History should be set with the data
FIX
Changed the "S" to "s' at line 1470 in intit.py as stated by the warning and this fixed it
Changed ticker.py:1333 to: df.fillna({"dividends":0}, inplace=True)
and ticker.py:1335 to df.fillna({"splits":0}, inplace=True)
NOTE that there may be other instances of this, these are the ones I've encountered so far
The text was updated successfully, but these errors were encountered: