Skip to content Skip to sidebar Skip to footer

Data Conversion Error While Applying A Function To Each Row In Pandas Python

I have a data frame in pandas in python which resembles something like this - contest_login_count contest_participation_count ipn_ratio 0 1

Solution 1:

I think there is problem dtype of some column is not float.

You need cast it by astype:

df['colname'] = df['colname'].astype(float)

Post a Comment for "Data Conversion Error While Applying A Function To Each Row In Pandas Python"