I am just trying to select the columns of my dat frame that only contains number greater than zero(I am dropping them off). But I am having some hard time.Here is what I am doing doing: I am using the boston dataset from sklearn by the way.
def positivecol(data):
for col in data.columns:
if data[col].eq(0):
data.drop(col,1, inplace=True)
return data
Could someone give me a good explanation as well, please