Yellow cover of One-Dimensional Dictionaries in Python. This template resource is from 365 Data Science.

One-Dimensional Dictionaries in Python

Hristina Hristova

Hristina Hristova

Course Author

The following template  is a program implementing a dictionary in Python where the keys are a couple of countries. The values are their corresponding capitals. Within the notebook, it is demonstrated how to retrieve keys and values from the dictionary, how to create a new key: value pair and how to loop through the keys and the values using a for-loop. Some other related topics you might be interested in are While Loops in Python, Dictionary Comprehension in Python, and Using Counter - a Dictionary Subclass in Python. The One-Dimensional Dictionaries in Python template is among the topics covered in detail in the 365 Data Science program.  

Hristina Hristova

Hristina Hristova

Course Author


Who is it for

Machine Learning Engineers, Data Scientists, Data Analysts, Data Architects, and BI Developers and anyone who wants to organize data using key: value pairs will find this free template helpful.

How it can help you

Dictionaries are a very useful datatype that helps organize data using key:value pairs. Each value could consist of one or more items - this divides dictionaries into one- and multi-dimensional ones. This template gives an example of a one-dimensional dictionary storing countries as keys and their respective capitals as values.

One-Dimensional Dictionaries in Python

Yellow cover of One-Dimensional Dictionaries in Python. This template resource is from 365 Data Science.