I am having problem in parsing list of strings in the below format. This is actually a pandas dataframe:
def parse_text_to_list(row):
print(row) # eval is not working as inner strings are missing the quotes
return row
df.apply(parse_text_to_list)
output
# printed only one row to simplify the question
['[[str1, str2], [str1, a long text], ..., [strn, strx]]']
But Want to convert it to a pure python list like:
[["str1", "str2"], ["str1", "a long text"], ... ["strn", "strx"]]
@Negative markers - let me know the reason