Year 11 - Computing
Reading CSV files
Programming: dictionaries and data files
Study Hub
This pupil-friendly study guide includes a unit summary, clear notes, common mistakes, and quick questions with answers.
Year 11 - Computing
Programming: dictionaries and data files
This unit introduces pupils to the new data structures of records and dictionaries. They will develop a Caesar cipher encryption program using a dictionary as a cipher wheel. Pupils will explore how data can be read from and written to files and how this data can be used within a program.
You will learn to read and structure data in a CSV file.
CSV text files group data together on individual lines and separates values in these groups by commas. CSV files can be read by a range of different spreadsheet software packages as well as Python files.
comma-separated values are a plaintext data file where each value is separated by a single comma. Add one real device or system example to prove understanding.
Mistake: It is not possible to interrogate a CSV file in Python without importing a specialised library. Correction: A CSV file behaves in the same way as a txt file in Python. Data is read from the file as strings and methods can be used to remove extra characters like commas, spliting the values either side in to separate items.
Browse all guides in the Year 11 Computing guide library.