You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
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(".", "-")
which can be traced back to the line of code below:
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.
The text was updated successfully, but these errors were encountered:
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:
yahoo_fin/yahoo_fin/stock_info.py
Line 130 in 7302561
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.The text was updated successfully, but these errors were encountered: