liveBook · Manning

Data handling

As explained in Learn AI-Assisted Python Programming, Second Edition

The collection, transformation, filtering, and analysis of data to produce usable information.

Data handling turns a stored dataset into useful information by reading, selecting, combining, sorting, and displaying records. A practical workflow separates the input file, the processing steps, and the output. section 2.8.2

A beginner-friendly workflow uses:

  • Input: inspect a CSV file, its header row, columns, commas, and rows. section 2.8.2
  • Process: read the file with Python, filter records by position, and add passing-yard totals for each player. section 2.8.2
  • Output: sort the totals from highest to lowest and print the selected players. section 2.8.2

NFL quarterback statistics

An NFL offensive-statistics CSV can be processed to find quarterbacks with the greatest combined passing yards. The output lists Patrick Mahomes, Tom Brady, Aaron Rodgers, Josh Allen, and Derek Carr; changing the instruction then removes Tom Brady from the printed results. section 2.8.2

Figure 2.5 The first few columns and rows of the nfl_offensive_stats.csv dataset
figure

Use the dataset preview to connect CSV columns and rows with the later filtering, aggregation, and ranking steps. section 2.8.2

How Learn AI-Assisted Python Programming, Second Edition covers it

How deep it goes
Explains CSV structure and processing steps, but defers detailed code understanding to later learning.
Examples
Uses an NFL offensive-statistics CSV to rank quarterbacks by summed passing yards and exclude one player.
What it assumes
Assumes no prior code understanding and teaches CSV columns, rows, headers, and delimiters from the beginning.
What you can do after
Apply it via Python and Copilot to read CSV data, filter records, total values, and print sorted results.
How it connects
Connects CSV files, Python, filtering, aggregation, sorting, and Copilot-assisted programming.

Also explained in

Compare how 2 books explain data handling →

Related concepts

This explainer was generated by Manning's knowledge graph from the text of Learn AI-Assisted Python Programming, Second Edition. The section links point to the parts of the book it draws on.