Answers for "pandas remove decimal but need nulls"

1

if none in column remove row

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

pandas replace empty string with nan

df = df.replace(r'^s*$', np.NaN, regex=True)
Posted by: Guest on June-09-2020

Python Answers by Framework

Browse Popular Code Answers by Language