pandas convertit float en int avec nan null valeur
#First replace all NaN values with 0 and convert
df['col'] = df['col'].fillna(0).astype(int)
Kwams
#First replace all NaN values with 0 and convert
df['col'] = df['col'].fillna(0).astype(int)
math.isnan(n)
a[a==0] = np.nan
x = float('nan')
import math
print math.isnan(float('NaN'))OutputTrue
print math.isnan(1.0)OutputFalse
import pandas as pd
pd.isnull(df.columnName).sum()
pd.notnull(df.columnName).sum()