Answers for "pandas not equal to condition"

2

pandas get value not equal to

df[~df['column_name'].isin(['value_1', 'value_2'])]
Posted by: Guest on November-08-2020
5

or condition in pandas

df2 = df[(df.a != -1) | (df.b != -1)]
Posted by: Guest on June-03-2020

Python Answers by Framework

Browse Popular Code Answers by Language