Suppose I have a dataframe of which one column is a list (of a unknown values and length) for example:
df = pd.DataFrame(
{'messageLabels': [['Good', 'Other', 'Bad'],['Bad','Terrible']]}
)
I came across this solution but it isnt what I am looking for. How best to extract a Pandas column containing lists or tuples into multiple columns
in theory the resulting df would look like
messageLabels | Good| Other| Bad| Terrible
--------------------------------------------------------
['Good', 'Other', 'Bad'] | True| True |True| False
--------------------------------------------------------
['Bad','Terrible'] |False|False |True| True
See above