original_header = ['a', 'b', 'c']
original_rows = [[1, 0, 1], [0, 0, 0], [1, 0, 0]]
columns = zip(*original_rows)
not_all_zero = [any(x) for x in columns]
processed_header = [x for i, x in enumerate(original_header) if not_all_zero[i]
    ]
processed_columns = [x for i, x in enumerate(columns) if not_all_zero[i]]
processed_rows = zip(*processed_columns)
print(processed_header)
print(processed_rows)
How to filter out columns that are all 0s in Python?