Topic - Reading Data from Files

Topics:

Materials:


Motivating Using Files in Python

For the rest of this course we will be working with data that comes out of files.  In this first video I explain a little bit about why this is really helpful and show you the types of files that we can work with.

VIDEO - File I/O Motivation (17 minutes)


Using Python to read from a file one line at a time

Now that we have our file of data and understand what it looks like, let's learn how to read the data one line at a time.

VIDEO - open(), close(), readline() (16 minutes)

VIDEO - readlines() and read() (7 minutes)

VIDEO - using the loop iterator to read [variation on readline() and what we will most use] (14 minutes)

 


Processing this data to get us interesting results

 

VIDEO - split() and converting the data to set it up for my BMI (16 minutes)