I have a text dataset (.txt) in form row_index a_dic id text. Here is an example
0 {'1': 0.27, '2': 0.68, '0': 0.5} 6081bdea52c838000aaa53d3 "some text"
I need to separate this by a delimiter so I can read into a pandas data frame. For example
0 {'1': 0.27, '2': 0.68, '0': 0.5}, 6081bdea52c838000aaa53d3, "some text"
I have tried
for idx, row in data.iterrows():
row.str.split(pat=r"\"\}", expand=True)
data
but that doesn't seem to do anything.