You can do that as follows:
df[(df['col_name'].str.contains('apple')) & (df['col_name'].str.contains('banana'))]
More Related Contents:
- Filter pandas DataFrame by substring criteria
- How to test if a string contains one of the substrings in a list, in pandas?
- Pandas filtering for multiple substrings in series
- Remove unwanted parts from strings in a column
- String concatenation of two pandas columns
- Find column whose name contains a specific string
- add a string prefix to each value in a string column using Pandas
- Pandas DataFrame stored list as string: How to convert back to list
- Pandas column access w/column names containing spaces
- How to remove square bracket from pandas dataframe
- NLTK-based text processing with pandas
- Left justify string values in a pandas DataFrame
- Count number of words per row
- Converting a column within pandas dataframe from int to string
- Capitalize first letter of each word in a dataframe column
- How to use str.contains() with multiple expressions in pandas dataframes
- Copy text between parentheses in pandas DataFrame column into another column
- How to drop rows of Pandas DataFrame whose value in a certain column is NaN
- How to make separator in pandas read_csv more flexible wrt whitespace, for irregular separators?
- Why isn’t my Pandas ‘apply’ function referencing multiple columns working? [closed]
- Convert the string 2.90K to 2900 or 5.2M to 5200000 in pandas dataframe
- Add x and y labels to a pandas plot
- python pandas extract year from datetime: df[‘year’] = df[‘date’].year is not working
- How to replace negative numbers in Pandas Data Frame by zero
- Removing the timestamp from a datetime in pandas dataframe
- vectorize conditional assignment in pandas dataframe
- How can I replicate rows of a Pandas DataFrame?
- How to get/set a pandas index column title or name?
- Pandas: drop columns with all NaN’s
- In Python pandas, start row index from 1 instead of zero without creating additional column