• What is a Hash Table or a Hashmap in Python?
• Creating Dictionaries
• Nested Dictionaries
❖Accessing Items
❖Updating Values
• Performing Operation oh Hash Tables
❖Deleting Entries
• Converting Dictionary into a Dataframe
www.edureka.co/python
What is a Hash Table or Hashmap in
Python?
www.edureka.co/python
What is a Hash Table or Hashmap in
Python?
www.edureka.co/python
Index Value
0 Value1
1 Value2
2 Value3
Key1
Key2
Key3
Hash
Function
Hash table or a Hashmap is a type of data structure that maps keys to its value pairs
Creating Dictionaries
www.edureka.co/python
www.edureka.co/python
Creating Dictionaries
Using curly Braces
Dictionary in Python is represented using curly
braces. Therefore, to create a dictionary, you can
make use of the curly braces.
Using dict()
Python provides dict() function that can be
used to create dictionaries by passing the
key-value pairs as parameters to it.
Nested Dictionaries
www.edureka.co/python
www.edureka.co/python
Nested Dictionaries
Nested dictionaries are basically dictionaries that lie within
other dictionaries
Index Value
0
1 Value2
2 Value3
Key1
Key2
Key3
Hash
Function
0.1 Value1.1
0.2 Value1.2
Performing Operations on Hash Tables
www.edureka.co/python
• Accessing Items
• Updating Values
• Deleting Entries
Copyright © 2017, edureka and/or its affiliates. All rights reserved.
www.edureka.co
www.edureka.co/python
Performing Operations on Hash Tables
Accessing Items
Index Value
0
1
2
Key1
Key2
Key3
Hash
Function
Value1
Value3
Value2
Values
www.edureka.co/python
Performing Operations on Hash Tables
Updating Values
Dictionaries are mutable data types and you can update them as and when
required.
Index Value
0
1 Value2
2 Value3
Key1
Key2
Key3
Hash
Function
Value1
www.edureka.co/python
Performing Operations on Hash Tables
Deleting Entries
Index Value
0 Value1
1 Value2
2 Value3
Key1
Key2
Key3
Hash
Function
Index Value
0 Value1
1 Value2
Converting Dictionary into a
Dataframe
www.edureka.co/python
www.edureka.co/python
DataFrame is a 2-D (2-dimensional) data
structure that consists of columns of various
types. It is very similar to a Python dictionary
and you can even convert a dictionary into a
pandas dataframe.
Converting
Dictionary into a
Dataframe
www.edureka.co/python

Hash tables and hash maps in python | Edureka