Jul-06-2019, 12:49 AM
Hi for all
i have read a CSV file with tow series columns as follow:
Dateobs TMIN
2006-01-01 NAN
2006-01-02 12.3
2006-01-03 11.3
..
2006-02-01 15.2
2006-02-02 Nan
2006-03-03 11.3
..
2016-04-06 15.8
2016-04-07 11.6
2016-04-08 Nan
..
etc..
thank you
i have read a CSV file with tow series columns as follow:
Dateobs TMIN
2006-01-01 NAN
2006-01-02 12.3
2006-01-03 11.3
..
2006-02-01 15.2
2006-02-02 Nan
2006-03-03 11.3
..
2016-04-06 15.8
2016-04-07 11.6
2016-04-08 Nan
..
etc..
Error:my question is how to replace NaN values for the daily TMIN column by mean group by (year month)
the table shown above was issued when i execute this pseudo codedata_pd = pd.read_csv('beirut.csv') # overwriting data after changing format data_pd["Dateobs"] = pd.to_datetime(data_pd["Dateobs"]) Dateobs_typedatetime64= data_pd["Dateobs"] print(Dateobs_typedatetime64) TMIN_typeFloat64= data_pd["TMIN"] print(TMIN_typeFloat64)any help or suggestions to overpass this complexity will be appreciate.
thank you