Pandas: Find The Rows Where A Given Column Contains Certain Substring
I have the following code, trying to find the rows in my_df where the values in column_A contain the substring 'abc'. my_df['abc' in my_df.column_A] but I got the following error
Solution 1:
This will return the required row/rows
my_df[my_df['column_A'].str.contains('abc')]
Post a Comment for "Pandas: Find The Rows Where A Given Column Contains Certain Substring"