I have Python 3.8 installed on my system and see the following warning when using the tickers_sp500 function:
C:\Python38\lib\site-packages\yahoo_fin\stock_info.py:130: FutureWarning: The default value of regex will change from True to False in a future version. In addition, single character regular expressions will*not* be treated as literal strings when regex=True.
sp500["Symbol"] = sp500["Symbol"].str.replace(".", "-")
The issue can be reproduced by running the following code:
PS > python
>>> from yahoo_fin import stock_info as si
>>> t = si.tickers_sp500()
C:\Python38\lib\site-packages\yahoo_fin\stock_info.py:130: FutureWarning: The default value of regex will change from True to False in a future version. In addition, single character regular expressions will*not* be treated as literal strings when regex=True.
sp500["Symbol"] = sp500["Symbol"].str.replace(".", "-")
Specs of my system:
OS: Win10-64 bit
Python: 3.8.2
yahoo_fin: 0.8.8
I believe changing replace(".", "-") to replace(".", "-", regex=True) in the line of code referenced above should take care of the warning (but I haven't tested it yet). See this issue referenced from the Pandas docs.
I have Python 3.8 installed on my system and see the following warning when using the
tickers_sp500
function:which can be traced back to the line of code below: https://github.com/atreadw1492/yahoo_fin/blob/730256155e7e97effa7df0f33a8ece03e56270da/yahoo_fin/stock_info.py#L130
The issue can be reproduced by running the following code:
Specs of my system: OS: Win10-64 bit Python: 3.8.2 yahoo_fin: 0.8.8
I believe changing
replace(".", "-")
toreplace(".", "-", regex=True)
in the line of code referenced above should take care of the warning (but I haven't tested it yet). See this issue referenced from the Pandas docs.