May-24-2020, 01:21 PM
(This post was last modified: May-24-2020, 01:21 PM by donnertrud.)
Hi guys,
I got a data set with missing values, however, those cells contain a "." instead of being empty. Here is an example :
![[Image: YPsYKvz]](https://imgur.com/a/YPsYKvz)
I want to resample the data to weeks with
DataError: No numeric types to aggregate
I guess I have to replace the cells, but I don't know with what and moreover, I do know how replace the string "." in the column, but this will also replace the other already existing values. I appreciate any help!
Edit : I tried the following :
I got a data set with missing values, however, those cells contain a "." instead of being empty. Here is an example :
I want to resample the data to weeks with
df = df.resample('1W').mean()But this gives me the error :
DataError: No numeric types to aggregate
I guess I have to replace the cells, but I don't know with what and moreover, I do know how replace the string "." in the column, but this will also replace the other already existing values. I appreciate any help!
Edit : I tried the following :
for i in range(len(df5["x"])): if df5["x"][i].isnumeric() is False: df5["x"][i] = df5["x][i].replace(".","") else: passBut this still replaces all "."