9951 explained code solutions for 126 technologies


python-pandasHow to remove missing values from dataframe


import pandas as pd

df = pd.DataFrame({
  'phone': ['ip5', 'ip6', None, 'sms', 'xi'],
  'price': [204, 304, 404, 405, 305]
})

found = df.dropna()ctrl + c
import pandas as pd

load Pandas module

pd.DataFrame

creates Pandas DataFrame object

.dropna(

drops None values from dataframe

found

will contain filtered dataframe