The DTypes and do not have a common DType. For example they cannot be stored in a single array unless the dtype is `object`.
Basically, to solve this problem, change the . Most likely it is in nano seconds. So change it to dates. Use the following formula: df['date']=df['date'].dt.date . Then when you do df.dtypes, it will show date as object. Just as the error message recommends.
The DTypes and do not have a common DType. For example they cannot be stored in a single array unless the dtype is `object`.
I have the same issue while I was attempting to split dictionary in one columns via apply(pd.Series). Basically, to solve this problem, change the dtypes of your variable. For me, I chose str format for both of them and after split them up I change the type of columns to proper format. pd.to_datetime for date and astype(int) for numerice column
The DTypes and do not have a common DType. For example they cannot be stored in a single array unless the dtype is `object`.
The DTypes and do not have a common DType. For example they cannot be stored in a single array unless the dtype is `object`.
|