Pandas > Drop columns with empty values

Name
Code
Output
dataframe = pandas.DataFrame(numpy.random.randint(0,100,size=(5, 3)), columns=['C1','C2','C3'])
dataframe['C2'] = numpy.nan
print ("dataframe")
print (dataframe)
# option with inplace will change the same dataframe
dataframe2 = dataframe.dropna(axis=1)
print ("dataframe drop empty column")
print (dataframe2)
dataframe
   C1  C2  C3
0  86 NaN   8
1  40 NaN  39
2  35 NaN  31
3  52 NaN  10
4  73 NaN  41
dataframe drop empty column
   C1  C3
0  86   8
1  40  39
2  35  31
3  52  10
4  73  41