9951 explained code solutions for 126 technologies

python-pandasHow to execute not equal query on dataframe

import pandas as pd

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

found = df[df['price'] != 304]ctrl + c
import pandas as pd

load Pandas module


creates Pandas DataFrame object


not equal expressions (price is not equal to 304 in our case)


filter dataframe based on given expression


will contain filtered dataframe