Search
 
SCRIPT & CODE EXAMPLE
 

PYTHON

Show Pandas Column(s) that Contain a Particular String/Substring

df.columns[df.columns.str.contains('string', case = True)]
Comment

column contains substring python

df2 = df.filter(regex='spike')
print(df2)
Comment

PREVIOUS NEXT
Code Example
Python :: Python terminal colour 
Python :: python yaml load_all 
Python :: Network.py socket 
Python :: python get system information 
Python :: pandas get column names with nan 
Python :: pandas apply with multiple arguments 
Python :: Multiple Box Plot using Seaborn 
Python :: blender python get selected object 
Python :: install python 3.9 centos8 
Python :: change freq of date index in pandas 
Python :: popup window python tkinter 
Python :: pyAudioAnalysis 
Python :: create dictionary comprehension python 
Python :: creating dictionary using the keys 
Python :: python get day month year 
Python :: append element to an array python 
Python :: python deque 
Python :: find the area of a circle in python 
Python :: list of files to zip python 
Python :: hmac in python 
Python :: datetimes to day of year python 
Python :: create a df in pandas 
Python :: sys.executable 
Python :: plot rows of dataframe pandas 
Python :: python get index of first element of list that matches condition 
Python :: lock in python 
Python :: modulus of python complex number 
Python :: python turn true or false into 0 or 1 
Python :: python match phone number 
Python :: plot histogram in seaborn 
ADD CONTENT
Topic
Content
Source link
Name
9+1 =