Answers for "pandas string not like"

1

pandas string does not contain

# simply use the invert operator '~' with 'str.contains'
new_df = df[~df["col"].str.contains(word)]
Posted by: Guest on November-05-2020
0

pandas query like

df.query('column_name.str.contains("abc")', engine='python')
Posted by: Guest on June-07-2021

Python Answers by Framework

Browse Popular Code Answers by Language