2

If this

data_no_control.loc[:, data_no_control.columns.str.contains('NGS')]

takes values which columns have an 'NGS' in their names.

How can I take the values of columns which names have not 'NGS' in the name

  • 1
    this question had been closed for the wrong reason, and the related link has nothing to do with it, otherwise here's how you can filter out columns not containing a specific word : "data.filter(regex="^((?!NGS).)*$",axis=1)" . – Kaoutar Jun 07 '22 at 14:08

0 Answers0