Skip to content Skip to sidebar Skip to footer

TypeError: Expected Unicode, Got Pandas._libs.properties.CachedProperty

I,m trying to add empty column in my dataset on colab but it give me this error. does anybody know possible solution for this? My code. dataframe['Comp'] = '' dataframe['Negative'

Solution 1:

I find an answer from Quabr, and it works:

Reason: It's due to 'freq' of datetimeindex was set as "pandas._libs.properties.CachedProperty object at 0x7fb22dd1e2c8>"

Answer : used df = df.asfreq('H') to set it correctly.


Post a Comment for "TypeError: Expected Unicode, Got Pandas._libs.properties.CachedProperty"