I was taking tutorial on pandas(dataframe) and came across an example (the code is given below)
import pandas as pd
df = pd.DataFrame([{'a':1,'c':2},{'a':3,'b':6,'c':8},{'a':78,'b':89,'c':78}])
print(df)
The output was:
a b c
0 1 NaN 2
1 3 6.0 8
2 78 89.0 78
So only float is the datatype in the columns having NaN, while others have int as datatype by default. Can someone provide me with an explanation for this?