9951 explained code solutions for 126 technologies


python-pandasHow to select null values from dataframe


import pandas as pd

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

found = df[df['phone'].isna()]ctrl + c
import pandas as pd

load Pandas module

pd.DataFrame

creates Pandas DataFrame object

.isna()

finds all NaN values

found

will contain filtered dataframe