Python Formatting comma separated text string to save as csv file
You should use cs_list = cs_file.split('\r\n').
Using a raw-string would have worked if you assigned cs_file with cs_file  = 'Reviewer Name,Account Reviewer Name,Account Manager Name\\r\\n"Last, First","Last, First","Last, First"'.
Python by default doesn't use raw-strings for assignment. I like to print strings to see how they visually look as all the escape characters can get confusing.
I have comma separated text (string format) from as output from an API call, an small example shown below.
cs_file  = 'Reviewer Name,Account Reviewer Name,Account Manager Name\r\n"Last, First","Last, First","Last, First"'
A new line is shown by '\r\n'. My thought would be to split the text at this first an then create a data frame by splitting at ",". However, splitting at '\r\n' does not work, just get one list...
cs_list = []
cs_list = cs_file.split(r'\r\n')
Any suggestions on a better approach? The goal would be to have this text saved as a csv.