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

Ticker.basic_info - fast but minimal alternative to info[] #1317

Merged
merged 10 commits into from
Jan 25, 2023

Conversation

ValueRaider
Copy link
Collaborator

@ValueRaider ValueRaider commented Jan 18, 2023

Draft implementation for #1300 so feedback wanted. See that Issue for discussion of why ...

Ticker.basic_info provides fast access to ~25 values of Ticker.info[], e.g. last close price. To encourage users to switch, these keys are removed from info. If user is using affected keys, then yfinance will print migration instructions eg:

dat.info["open"]

Price data removed from info. Use Ticker.basic_info or history() instead

@YieldPilot
Copy link

If beta and dividendRate were moved over I could switch to basic_info as well

@ValueRaider
Copy link
Collaborator Author

ValueRaider commented Jan 25, 2023

@YieldPilot Moved over from where?

@YieldPilot
Copy link

Sorry - I meant: I am currently using beta and dividendRate from .info - if those were moved to .basic_info I woul dstop using .info.

@ValueRaider
Copy link
Collaborator Author

@YieldPilot basic_info doesn't move anything from info, it fetches/calculates data via different methods. If you know a different way to get beta or dividendYield then you are free to implement and submit a Pull Request.

@ValueRaider ValueRaider mentioned this pull request Jan 25, 2023
@ValueRaider ValueRaider deleted the feature/prune-info branch January 26, 2023 00:08
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

Successfully merging this pull request may close these issues.

2 participants