dataframe column remove zero code example Example 1: pandas drop zero values df.loc[(df!=0).any(axis=1)] Example 2: remove unnamed 0 column pandas df.to_csv(index=False)