Search
 
SCRIPT & CODE EXAMPLE
 

PYTHON

panda search strings in column

# find rows in `df1` which contain "foo" followed by something
df1[df1['col'].str.contains(r'foo(?!$)')]

      col
1  foobar
Comment

PREVIOUS NEXT
Code Example
::  
:: get token from request django 
Python :: string to list python 
:: merge dataframe pandas 
Python :: pd.dataframe initial columns 
Python ::  
Python :: en_core_web_sm 
Python :: random number generator in python 
::  
:: Python t date from a timestamp 
:: how to iterate through a list in python 
::  
Python :: ValueError: Found array with dim 3. Estimator expected <= 2. 
Python :: sorting tuples 
::  
Python ::  
::  
:: python password with special characters 
Python :: How to convert string date to datetime format in python 
::  
::  
::  
:: python print 2 decimal places 
::  
:: create empty numpy array without shape 
Python ::  
:: matplotlib animate 
Python :: how can i plot graph from 2 dataframes in same window python 
Python ::  
::  
ADD CONTENT
Topic
Content
Source link
Name
6+3 =