i know, its was asked 9 years ago but, i think using explode may help. something like
exploded = df.explode("genre") exploded[exploded["genre"] == "comedy"]
I think its very usful to expand the line for each genre