Replies: 2 comments 3 replies
-
Beta Was this translation helpful? Give feedback.
1 reply
-
Are the yfinance dataframes big enough for this to be measurable, compared to Python interpreter and network? Have you benchmarked actual yfinance operations, not micro-benchmarks like groupby? |
Beta Was this translation helpful? Give feedback.
2 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
RFC: pandas → Polars migration + uv tooling (v2.0.0)
This is an invitation to discuss, not a request to merge immediately.
The full rationale, every breaking change, and side-by-side code comparisons
are documented in
docs/migration-v2-polars.md(rendered below on GitHub).
Why open this PR?
The two most consistent pain points in yfinance's history have been:
The MultiIndex column output of
download()— there is a dedicateddoc page for it that simply points to a Stack Overflow answer. The
community's own workaround (
df.stack(level=1).reset_index()) producesexactly the long-form shape this PR returns natively.
pandas as a hard dependency — polars is faster, has an immutable
DataFrame model that eliminates a whole class of mutation bugs present
in the current codebase (including
df._consolidate()being called inproduction), and requires no index concept (dates are explicit columns).
PR #2782 focuses on
setup.py→pyproject.toml+uvpytest.yml; all workflows useuv rundownload()pl.DataFramewith"Ticker"column instead of MultiIndexhistory()pl.DataFrame;as_pandas=Truebridge for backward compatdocs/migration-v2-polars.mdWhat stays the same
actions=Truedefault — Dividends/Stock Splits columns present as beforerepair=True— works whenpandas[pandas]extra installedas_pandas=Trueonhistory()— returns exact v1 DataFrame shapeQuestions for the maintainer / community
download()output something the community would embrace?>=3.10)?Happy to split this into smaller incremental PRs (e.g. just the uv/packaging
change, or just the
download()shape change) if that makes review easier.Beta Was this translation helpful? Give feedback.
All reactions