how to drop the rows which have zeros in the dataframe code example Example: pandas drop zero values df.loc[(df!=0).any(axis=1)]