Assuming your DataFrame is in df
:
df.Temp_Rating.fillna(df.Farheit, inplace=True)
del df['Farheit']
df.columns="File heat Observations".split()
First replace any NaN
values with the corresponding value of df.Farheit
. Delete the 'Farheit'
column. Then rename the columns. Here’s the resulting DataFrame
: