I have a pandas df like this
a column
_____
NaN
e
NaN
b
I want to save the count of a non-nan values in a new dataframe:
df_ new=pd.DataFrame()
df_new['column1']= int(df["a column"].count())
My expected output is:
df_new
column1
2
but nothing happens. Why?


