def box(l):
    lengths = [len(item) for item in l]
shape = len(l), max(lengths)
a = np.full(shape, None, dtype=object)
for i, r in enumerate(l):
    a[(i), :lengths[i]] = r
return a
set(box(df.genres.tolist()).ravel().tolist())
Getting unique values from lists(containing tags) in dataframe row