I can use pandas dropna() functionality to remove rows with some or all columns set as NA\'s. Is there an equivalent function for drop
pandas
dropna()
NA
One-liner. No transpose needed:
df.loc[~(df==0).all(axis=1)]
And for those who like symmetry, this also works...
df.loc[(df!=0).any(axis=1)]