Python Dictionaries and Frequency Tables

Building upon the Python Dictionaries lesson, you’ll continue to develop your Python programming skills by learning how to use dictionaries to build frequency tables to check how often a certain event occurs in a dataset.

In this lesson, you’ll learn concepts such as check for dictionary membership, update dictionary values, and count values using dictionaries—and more. You’ll also combine your knowledge of for loops to loop over dictionaries to create a frequency table for key-value pairs within the dictionary.

When you finish this lesson, you’ll be more confident in your ability to use Python for data science and data analysis. If you feel like you need practice, think of something you can create using what you’ve learned so far; it doesn’t have to be big. It can be something small, like a calculator. Or if you feel like you need more practice with dictionaries in Python—or just want to learn more concepts as it relates to dictionaries—check out this tutorial that covers the basics of Python dictionaries.

Objectives

  • Learn how to update dictionary values
  • Learn how to check for values in a dictionary
  • Learn how to count using dictionaries
  • Learn how to loop over dictionaries

Lesson Outline

  1. Checking for Membership
  2. Updating Dictionary Values
  3. Counting with Dictionaries
  4. Finding the Unique Values
  5. Proportions and Percentages
  6. Looping over Dictionaries
  7. Keeping the Dictionaries Separate
  8. Frequency Tables for Numerical Columns
  9. Filtering for the Intervals
  10. Review
  11. Takeaways

Get started for free

No credit card required.

Or With

By creating an account you agree to accept our terms of use and privacy policy.