CSV ToolsLesson 355Free preview
CSV to YAML
This lesson is part of Web Developer Tools · All levels
Summary
CSV to YAML converts the table data to YAML, a format that relies on indentations to show structure. Each row of CSV is usually a single mapping within the list, with the column name as the key. YAML is easy to read by humans and is often used for configuration, but the indentation and colon markings need to be carefully written.
Key points
- YAML uses spatial indentation, not curly braces.
- One row of CSVs is generally a single item list containing mapping
- The value of a string containing a colon should be quoted
- Tabs should not be used for YAML indentation
- Conversion needs to keep the data type so that the numbers don't turn into strings.
Full lesson
Code examples and quizzes
Full lessons, code examples, and quizzes are available to subscribers. 5 questions.