I have a temperature and solar radiation timeseries saved as a csv file. For some reason when I resample "sRad", there is a type error that states it can only concatenate str (not "int") to str. But I do not have this error when I resampled temperature. I've checked the csv and both formats are general and the same. I am at a complete lost why this is. I am open to any suggestions or comments for this error. I checked df.dtypes
and it appears that sRad is not float. So I tried the following two commands but it remains as an object.
df.convert_objects(convert_numeric=True)
df.apply(lambda col:pd.to_numeric(col,errors='coerce'))
df = pd.read_csv("D:/sRad-ts.csv, parse_dates=["Time"],index_col="Time")
tmean = df["airtemp"].resample("24H").mean().interpolate(limit = 3)
sRad = df["sRad"].resample("24H").mean().interpolate(limit = 3)
df.dtypes
airtemp float64
sRad object
dtype: object