When working with pandas DataFrame, if you want to transform each element in an iterable to a row, use explode
use explode
My previous tips on pandas.