Answers for "if column is in string"

11

dataframe column contains string

df[df['A'].str.contains("hello")]
Posted by: Guest on September-28-2020
2

get columns containing string

df2 = df.filter(regex='spike')
print(df2)
Posted by: Guest on January-08-2020

Code answers related to "if column is in string"

Python Answers by Framework

Browse Popular Code Answers by Language