Apologize for what may be a very easy Python problem. I am working with a txt file that has this format. It's all one line.
('text1','attribute1')('text2','attribute2')('text3','attribute3') .... ('text999','attribute999')
The file was originally written as a list of tuples but I would like to just extract it into a pandas dataframe with two columns. Is there an easy way to do that?
Edit: I suppose I need the first steps. Here is where I'm at:
myfile = open(file, 'r')
lines=myfile.readlines()
Output of lines looks like this, type list with length 1.
'(\'text1\', \'attribute1\')(\'text2\', \'attribute2\')
The backslashes aren't in the source txt file.