I have a dataFrame in pandas and several of the columns have all null values. Is there a built in function which will let me remove those columns?
dataFrame
Function for removing all null columns from the data frame:
def Remove_Null_Columns(df): dff = pd.DataFrame() for cl in fbinst: if df[cl].isnull().sum() == len(df[cl]): pass else: dff[cl] = df[cl] return dff
This function will remove all Null columns from the df.