drop column with all values zeros in pandas python code example Example: pandas drop zero values df.loc[(df!=0).any(axis=1)]