I created a single columen dataframe filled with np.nan as follows:
df=pd.DataFrame([np.nan]*5)
0
0 NaN
1 NaN
2 NaN
3 NaN
4 NaN
when I try to look for the data type of df.iloc[0,0]
, i.e. NaN, the value returns numpy.float64
I know that the pd.isnull
function could correctly returns true for these np.NaN. However, I don't understand why the data type is a float?