Answers for "how to drop none in 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

drop column with nan values

fish_frame = fish_frame.dropna(axis = 1, how = 'all')
Posted by: Guest on August-27-2020

Python Answers by Framework

Browse Popular Code Answers by Language