If you have to use df.query(), the correct syntax is:
df.query('column_name.str.contains("abc")', engine='python')
You can easily combine this with other conditions:
df.query('column_a.str.contains("abc") or column_b.str.contains("xyz") and column_c>100', engine='python')
It is not a full equivalent of SQL Like, however, but can be useful nevertheless.
与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…