Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR PYTHON

pandas search value in column contains

# For columns of string elements, searching if it contains the word. 
# Case insensitive

df.loc[df['column_name'].str.contains("search_word", case=False)] 
Source by www.statology.org #
 
PREVIOUS NEXT
Tagged: #pandas #search #column
ADD COMMENT
Topic
Name
9+5 =