Your starting point
Prerequisites: Use the ideas and vocabulary from lesson 42; revisit its worked examples if needed.
Definition: CSV is a text format that represents rows as records and fields separated by a delimiter, commonly a comma. Quoting allows a field to contain delimiters, quotation marks or line breaks. CSV stores text values, not spreadsheet formulas, formatting or a complete data dictionary.
Read the structure rather than splitting blindly
A comma inside a quoted field is part of that value, not a new column. A quotation mark inside a quoted field is represented by two quotation marks. A line break inside quotes belongs to the field. Consequently, splitting every line on commas can corrupt otherwise valid data. The academy parser follows these common CSV conventions and reports malformed quoting or inconsistent field counts.
Make import assumptions visible
Choose the delimiter, confirm the header row and inspect several records. Column names must be nonempty and unique in this workbench. UTF-8 text and an optional byte-order mark are supported. A file can be syntactically valid while containing ambiguous dates, missing units or inconsistent categories, so parsing success is only the beginning of the quality check.
Export with a reader in mind
A CSV does not preserve chart styles, workbook tabs or type metadata. Export analysis settings separately when they matter. Some spreadsheet programs interpret formula-like text when opening CSV; the academy’s safer export prefixes such nonnumeric values with an apostrophe. That changes their representation intentionally, so document it when exact text fidelity is important and retain the original source copy.
Two worked examples
An embedded comma
The record "Lee, Jo",3 contains two fields: the name Lee, Jo and the count 3. A naive comma split would produce three fragments. The surrounding quotation marks tell a CSV parser to preserve the comma as part of the first field.
An embedded quote
The field "said ""yes""" represents the text said "yes". The doubled inner quotes encode literal quotation marks. Similarly, a quoted comment can contain a line break without creating a new record. After import, inspect the rendered cell and reconcile the row count with the source.
Where this becomes useful
A team exchanges a table between spreadsheet software and a browser tool. A CSV export is portable, but a companion dictionary is needed to preserve units, missing-value rules and the meaning of identifiers.
Make an attempt
Import a small CSV containing a quoted comma, a doubled quote and a quoted multiline comment. Inspect the preview and export it again. Then try an unclosed quote or a row with too few fields and read the error instead of silently accepting corrupted structure.
Misconception check
Claim: Every newline in a CSV starts a new record.
Inspect the correction
A newline inside a quoted field belongs to that field. Use a parser that tracks quoting state.
Independent application
Create and round-trip a five-row CSV with commas, quotes, blank cells and a multiline field. Verify headers and every record after import. Attach a short dictionary and note any spreadsheet-safe export changes to formula-like text.
Completion records practice and self-review. It is not certification of statistical competence.
