I have a pandas line of code that gives me a future deprecation warning as stated in the title and I can't find in the pandas documentation how to modify it in order to remove the warning. The line of code is the following:
df['temp_open']=df['temp_open'].replace('',method='ffill')
Any help would be greatly appreciated.
I tried to fill blanks and it works, but I would like to get rid of the warning.
You can do this instead :
And if you want to keep the nulls (if any) untouched, you can use :
Output :
Used input :