I want to retain only non zero columns
df:
Names Henry Adam Rachel Jug Jesscia
Robert 54 0 0 6 5
Dan 22 31 0 0 55
Expected output:
Names Henry Jesscia
Robert 54 5
Dan 22 55
df.loc[:, (df != 0).any(axis=0)]
did not remove the columns with only one zero value