to read in the events data file I would probably use pandas.read_csv() (setting delim=" " for space-separated, or delim="\t" for tab-separated as appropriate, if itβs not actually a CSV).
This code just creates a fake dataframe similar to the one youβd read in:
import numpy as np
import pandas as pd
data = np.zeros((12, 4), dtype=int)
for ix, row in enumerate(data):
row[ix % 4] = 1
df = pd.DataFrame(columns=["Class1", "Class2", "Class3", "Class4"], data=data)
If each class is βactiveβ for 150 data samples, you could make an events file like this: