for row in values:
msec = row[6]
time = int(round(msec / unit))
ret[time, 0] = 1
row[6] should be row[5], since the columns of the "score" dataframe in my computer, is
score values: Index(['live_id', 'live_difficulty_id', 'live_difficulty_type', 'title',
'note_id', 'timing_msec', 'rail', 'note_type', 'diff', 'bgm_path'],
dtype='object')
Personally, I recommend using score.to_dict("records") instead of score.values and changing row[6] to row["timing_msec"]