Discover more from Daily Dose of Data Science
DotMap: A Better Alternative to Python Dictionary
Python dictionaries are great, but they have many limitations.
It is difficult to create dynamic hierarchical data. Also, they don't offer the widely adopted dot notation to access values.
Instead, use DotMap. It behaves like a Python dictionary but also addresses the above limitations.
What's more, it also has a built-in pretty print method to display it as a dict/JSON for debugging large objects.
Read more: GitHub.
Share this post on LinkedIn: link.
Thanks for reading Daily Dose of Data Science! Subscribe for free to receive new posts and support my work.
Find the code for my tips here: GitHub.