Answers for "if a specific column name is present drop tyhe column"

0

if a specific column name is present drop tyhe column

df.columns.str.startswith('Test')
# array([ True, False, False, False])

df.loc[:,~df.columns.str.startswith('Test')]

  toto test2 riri
0    x     x    x
1    x     x    x
Posted by: Guest on November-21-2019

Code answers related to "if a specific column name is present drop tyhe column"

Python Answers by Framework

Browse Popular Code Answers by Language