Had a similar issue. I was getting csv data in this format
["User Name\r\nEmail\r\nContact\nAddress", "Name 1\r\[email protected]\r\n+12345657890\r\nSample Address", "Name 2\r\[email protected]\r\n+21345657890\r\nSample Address 2", ]
I used [i.splitlines() for i n data]
to convert in list of list
>>> data = ["User Name\r\nEmail\r\nContact\nAddress", "Name 1\r\[email protected]\r\n+12345657890\r\nSample Address", "Name 2\r\[email protected]\r\n+21345657890\r\nSample Address 2", ]
>>> [i.splitlines() for i in data]
[['User Name', 'Email', 'Contact', 'Address'], ['Name 1', '[email protected]', '+12345657890', 'Sample Address'], ['Name 2', '[email protected]', '+21345657890', 'Sample Address 2']]
\n
is a new-line character – Otes