df[df.columns[df.columns.str.contains(pat = 'WORDABC9')]] WORDABC9N123 WORDABC99N123 0 13 16 1 14 17 2 15 18 df[df.columns[df.columns.str.contains(pat = 'WORDABC9\\b')]] Empty DataFrame Columns: [] Index: [0, 1, 2]
Preview:
downloadDownload PNG
downloadDownload JPEG
downloadDownload SVG
Tip: You can change the style, width & colours of the snippet with the inspect tool before clicking Download!
Click to optimize width for Twitter