Closed BiggRanger closed 3 weeks ago
It was changed here #2068. And their argument makes sense - if the calling code always expects just one ticker, then use Ticker.history
. Then code that calls download
and expects a MultiIndex
always gets it, no special case needed. @ranaroussi @antoniouaa
I've pushed a new version that will address both cases (I actually had cases where the new approach broke things).
I've added multi_level_index
parameter to multi.py with a default value to True
. If set to False
and only one ticker is requested - the returned DataFrame will be single-level-index. If not specified, or specified as True
- a multi-level index will be returned regardless.
Describe bug
Refactoring multi.py to return single-level indexes when using a single ticker is breaking a lot of existing code in several applications. Was this refactor necessary?
Debug log
No response
yfinance version
0.2.47
Python version
3.10
Operating system
kubuntu 22.04