I'm having issues attempting to use inplace = True so that I don't have to constantly make a new variable to hold the changes to the Dataframes. does is work on sum functions and not others? where else can I use it? Should I just store the change in the DataFrame with a new variable and not use inplace?
sp500["Close"].str.replace("$", " ").astype(float)
sp500["Close"].str.replace({"$", " "}, inplace = True).astype({float}, inplace =True)
These worked with no problem
sp500.dropna(inplace = True)
sp500.sort_index(ascending = True, inplace =True)
Sample of the Data frame
Date
2012-10-01 1444.49
2012-10-02 1445.75
2012-10-03 1450.99
2012-10-04 1461.40
2012-10-05 1460.93
...
2019-04-16 2907.06
2019-04-17 2900.45
2019-04-18 2905.03
2019-04-22 2907.97
2019-04-23 2933.68