Skip to content
New issue

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

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

Already on GitHub? # to your account

Fix pandas FutureWarning: "Passing literal html to 'read_html' is deprecated" #1740

Merged
merged 2 commits into from
Nov 9, 2023

Conversation

mikez
Copy link
Contributor

@mikez mikez commented Nov 9, 2023

This addresses #1685 (institutional_holders) and also get_earnings_dates().

Pandas issue is found here:
pandas-dev/pandas#53767
and the change in code here:
https://github.com/pandas-dev/pandas/blob/5cedf87cccd77c7b4b6aaa64bfec98b32b512f68/pandas/io/html.py#L1238

As for legacy Python 2.7 support: io.StringIO seems to be supported in the versions I tested. See https://docs.python.org/2/library/io.html

…recated"

This addresses ranaroussi#1685 (`institutional_holders`) and also `get_earnings_dates()`.

Pandas issue is found here:
pandas-dev/pandas#53767
and the change in code here:
https://github.com/pandas-dev/pandas/blob/5cedf87cccd77c7b4b6aaa64bfec98b32b512f68/pandas/io/html.py#L1238

As for legacy Python 2.7 support: `io.StringIO` seems to be supported in
the versions I tested. See https://docs.python.org/2/library/io.html
@ValueRaider
Copy link
Collaborator

Looks fine. I've restored earnings_dates unit tests. If no complaint then I'll merge.

@mikez
Copy link
Contributor Author

mikez commented Nov 9, 2023

👍 Sounds good to me.
Do you want to remove or change the comment "Below will fail because not ported to Yahoo API"?

@ValueRaider
Copy link
Collaborator

Good spot. I've moved comment, and git-squashed so remember to pull/reclone.

@ValueRaider ValueRaider merged commit 6d3d6b6 into ranaroussi:main Nov 9, 2023
# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants