In this video, the author shows you how to simplify data manipulation, using advanced containers from the Python collections module.
- [Instructor] There's a lot that we can do…with Python lists and dates,…but in some cases, we need a little more.…The Python Collections module offers several more objects,…all very useful to organize sequences in different ways.…In this video we will learn how to use namedtuple…to describe records efficiently;…use Counter to count identical elements in a sequence;…use defaultdict and OrderedDict to code dictionaries…with default values or ordered keys;…use deque to manipulate double-ended queues.…
As usual, I start by importing all packages…used in this chapter.…We'll play with data about all the gold medals…that were won at the Olympics in athletics.…So we start by reading in a data file.…Before we can parse it, we should understand its structure.…We'll open it in reading mode,…read all the lines, and display only the first 10.…This is simple tabular data separated by tabs, slash t.…The best way to handle tabular data…is a library such as pandas,…which I describe in my course on Introduction…to Data Analysis with Python.…
- Designing efficient loops
- Exploiting Python collections
- Writing Pythonic code
- Choosing the best libraries for your tasks
- Downloading webpages with requests
- Parsing HTML with Beautiful Soup
- Manipulating images with Pillow
- Making videos and drawing on maps with matplotlib
- Serving webpages with Jinja2 and Flask
- Working with Python classes
- Taking advantage of functional techniques
- Profiling CPU and memory use
- Exploiting parallelism
Skill Level Intermediate
1. Installation and Setup
Jupyter notebooks3m 19s
2. Writing Python Efficiently
3. Exploiting Python Libraries
4. Advanced: Python Object-Oriented and Functional Programming
5. Introduction to Performance Optimization in Python
Next steps1m 2s
- Mark as unwatched
- Mark all as unwatched
Are you sure you want to mark all the videos in this course as unwatched?
This will not affect your course history, your reports, or your certificates of completion for this course.Cancel
Take notes with your new membership!
Type in the entry box, then click Enter to save your note.
1:30Press on any video thumbnail to jump immediately to the timecode shown.
Notes are saved with you account but can also be exported as plain text, MS Word, PDF, Google Doc, or Evernote.