how to drop all zeros from a data frame in python code example Example: pandas drop zero values df.loc[(df!=0).any(axis=1)]