I’m working on guided project #3 in the python course. It’s a project where you have to analyze a bunch of car sale listings. I keep getting the following warning message now, even though I never used to before?
My Code:
autos['price'] = (autos['price']
.str.replace('$','')
.str.replace(',','')
.astype(int))
autos['price'].head()
What I expected to happen: Nothing, actually. I don’t expect any kind of error at all.
What actually happened:
<ipython-input-8-194571f1379e>:1: 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.
autos['price'] = (autos['price']
0 5000
1 8500
2 8990
3 4350
4 1350
Name: price, dtype: int32
I have the exact same code used again with a different column name, but I don’t get that Futurewarning message. What is causing this? So I actually tried this project a day or two ago using the same code, but did not receive this warning. The code still works, but I don’t like having that big message there.