I have this piece of code:
from collections import Counter for i in range(topics_number): list_tokens = df[df[\'topic\'] == i][\'tokens\'].to_list()