I currently have an string output that looks like this:
Shares Mil,"1,457","1,388","1,341","1,287","1,214","1,155","1,103","1,010",983,959,949
and I need it to look like this:
Shares Mil,1457,1388,1341,1287,1214,1155,1103,1010,983,959,949
Basically I want to remove the commas in the numbers that are surrounded by quotes and then be able to separate the strings by the commas using .split(',') into a list.
I had an idea to find the commas within the quotes using regular expression to remove the commas and then removing the quotes with .replace('"','') but I'm not sure how to.
I could .split() by the commas and remove the quotes and then manually join the separated numbers but there has to be a more efficient way of doing this, so I thought I'd ask for help.
Thanks!