df (Pandas Dataframe) has three rows.
col_name
"This is Donald."
"His hands are so small"
"Why are his fingers so short?"
I'd like to extract the row that contains "is" and "small".
If I do
df.col_name.str.contains("is|small", case=False)
Then it catches "His" as well- which I don't want.
Is below query is the right way to catch the whole word in df.series?
df.col_name.str.contains("is|small", case=False)
See Question&Answers more detail:
os 与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…