I have this \'file.csv\' file to read with pandas:
Title|Tags T1|\"[Tag1,Tag2]\" T1|\"[Tag1,Tag2,Tag3]\" T2|\"[Tag3,Tag1]\"
using
You can convert the string to a list using strip and split.
strip
split
df_out = df.assign(Tags=df.Tags.str.strip('[]').str.split(',')) df_out.Tags[0][0]
Output:
'Tag1'