O'Reilly logo

Head First Python by Paul Barry

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Chapter 5. Comprehending data: Work that data!

image with no caption

Data comes in all shapes and sizes, formats and encodings. To work effectively with your data, you often have to manipulate and transform it into a common format to allow for efficient processing, sorting, and storage. In this chapter, you’ll explore Python goodies that help you work your data up into a sweat, allowing you to achieve data-munging greatness. So, flip the page, and let’s not keep the coach waiting...

Coach Kelly needs your help

image with no caption

The coach is an old friend, and you’d love to help. His crack squad of U10 athletes has been training hard. With each 600m run they do, Coach Kelly has recorded their time in a text file on his computer. There are four files in all, one each for James, Sarah, Julie, and Mikey.

image with no caption

Initially, the coach needs a quick way to know the top three fastest times for each athlete.

Can you help?

Do this!

Before proceeding with this chapter, take a few moments to download the four data files from the Head First Python support website.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required