0

the mdf file contain many channel with Cha_meas_1,Cha_meas_2,Cha_meas_3,Cha_meas_4,Cha_meas_5,......Cha_meas_15.i want to count the number of channel starting with Cha_meas_,

Currently i am doing as below:

mdf_data = Data.to_dataframe(ignore_value2text_conversions=True,use_interpolation=False)
conditional_colum = [col for col in mdf_data.columns if 'Cha_meas_' in col]
num_cols = len(conditional_colum)

Is there any other way to do the same like counting the channel using asammdf library?

Mageo
  • 84
  • 2
  • 9

1 Answers1

1
len([ch for ch in mdf.channels_db if ch.startswith("Cha_meas_"])
danielhrisca
  • 665
  • 1
  • 5
  • 11