Answers for "remove columns that only contain 0 pandas"

1

if none in column remove row

import pandas as pd
df = df[pd.notnull(df['Gender'])]
Posted by: Guest on December-25-2020
0

remove columns that contain string pandas

df = df[df.columns.drop(list(df.filter(regex='Test')))]
Posted by: Guest on August-12-2021

Code answers related to "remove columns that only contain 0 pandas"

Python Answers by Framework

Browse Popular Code Answers by Language