• Free preview
  • Text
  • 8m

Reading a dataset

Turn CSV text into rows you can work with.

Most data arrives as CSV: one record per line, values separated by commas, and a header line naming the columns. Python's csv module reads it into dictionaries, one per row.

python · editable

Enroll in the course to run this code.

Everything read from a CSV is text. Convert numbers before you calculate with them:

python · editable

Enroll in the course to run this code.

This was a free lesson from Data Analysis with Plain Python

See the full course outline and enroll to keep going.

View the course