yfinance icon indicating copy to clipboard operation
yfinance copied to clipboard

Feature Request: Add an option to have column and index names as lower case in history/download

Open furechan opened this issue 2 years ago • 3 comments

Ticker.history and download both return a dataframe with column names properly cased (first letter is upper).

Some technical analysis/charting libraries expect column names as lower case!

Currently I have to sprinkle over some calls to rename and rename_axis to convert column and index names :

prices = prices.rename(columns=str.lower).rename_axis(index=str.lower)

It would be nice to have an option in the api to do the same builtin.

Thanks for the great library!

furechan avatar Sep 14 '23 14:09 furechan

Unless lower-case is widely accepted convention, then it's their responsibility to convert to lower-case.

ValueRaider avatar Sep 14 '23 16:09 ValueRaider

OK. Thank You

furechan avatar Sep 14 '23 18:09 furechan

I would say "lower-case" is not something not used.

pinkfrog9 avatar Feb 01 '24 22:02 pinkfrog9