I am having data which contain 1081 columns, some of the columns having 99% zero values, I want to separate those column and store into new data frame, which column having 99% zero values. I am only able to do write this much, can anyone help me to write the code.
for cl,ro in df.iteritems():
n_zeros = (ro == 0).sum()
percent_zero = n_zeros / len(df) * 100