LoginSignup
0
0

More than 5 years have passed since last update.

Pandasのデータラングリングの基礎 - ある列である値を持つ奴らだけのデータフレームを作る。-

Posted at

複数条件のものは|で繋げる。or or orという感じ。和集合。積集合にするときは&

dframe3=dframe2[dframe2['Diagnosis'].str.contains('GBM') | dframe2['Diagnosis'].str.contains('AA') | dframe2['Diagnosis'].str.contains('DA') | dframe2['Diagnosis'].str.contains('OG') | dframe2['Diagnosis'].str.contains('AOG') | dframe2['Diagnosis'].str.contains('OA') | dframe2['Diagnosis'].str.contains('AOA') | dframe2['Diagnosis'].str.contains('GBMO') | dframe2['Diagnosis'].str.contains('AS') | dframe2['Diagnosis'].str.contains('HGG') | dframe2['Diagnosis'].str.contains('LGG') | dframe2['Diagnosis'].str.contains('AO') ]

0
0
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
0
0