Write parse_csv(text) for a CSV export: the first record is the header, and every later record becomes a dict mapping each header name to that record's value. All values stay strings. Return the dicts in order.
The format is standard CSV:
- •fields are separated by commas, records by
\n or \r\n; - •a field wrapped in double quotes may contain commas and line breaks;
- •inside a quoted field,
"" stands for one literal "; - •nothing is trimmed: spaces around a value are part of the value.
Every record has as many fields as the header. Text with only a header, or no text at all, returns [].
Python 3.13 in your browser — the standard library plus pandas and numpy; no pip installs.