我必须从dataframe中排除对正列中不包含单词spare的行:
"Justification":"WIWYNN | MSASM Spares | 21| MDM: 2520171"
我试过以下几种方法,但都不管用
df= df.where(~ df["Justification"].like("%spares%"))
df = df.where(~(col("Justification").like("%spare%")))
df = df.where("Justification not like '%spare%'")
返回结果的行中,对正列中有备用字,即使我做了否定。你知道吗
I want exact opposite result
请尝试以下代码。好像是区分大小写的。在比较之前,您需要使用一个较低的函数。你知道吗
相关问题 更多 >
编程相关推荐