Turing Backend Module 1: Lesson Link
Before starting this tutorial, you should be comfortable with:
- the topics covered in Ruby in 100 Minutes
- installing a gem
- using
IRB
(orpry
) - writing methods
After completing this tutorial, you will be able to:
- manipulate file input and output
- read content from a CSV (Comma Separated Value) file
- transform it into a standardized format
- manipulate strings
For this project, two data files have been saved to the data
directory:
event_attendees.csv
: small sample data file (~20 lines)full_event_attendees.csv
: large sample data file (5,000+ lines)
- Read the File Contents
- Read the File Line By Line
- Display the First Name of All Attendees
- Skipping the Header Row
- Look for a Solution before Building a Solution
- Switching over to use the CSV Library
- Accessing Columns by their Names
- Displaying the Zip Codes of All Attendees
- Pseudocode for Cleaning Zip Codes
- Handling Bad and Good Zip Codes
- Handling Missing Zip Codes
- Moving Clean Zip Codes to a Method
- Refactoring Clean Zip Codes