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
Replace the zeros with nan and then drop the rows with all entries as nan. After that replace nan with zeros.
nan
import numpy as np df = df.replace(0, np.nan) df = df.dropna(how='all', axis=0) df = df.replace(np.nan, 0)