Category: Python
Python tutorials
Using OrderedDict in Python
Sometimes you need a Python dictionary that remembers the order of its items. In the past, you had only one tool for solving this specific problem: Pythonâs OrderedDict. Itâs a dictionary subclass specially designed to remember the order of items, which is defined by the insertion order of keys. This changed in Python 3.6. The built-in dict class now keeps its items ordered as well. Because of that, many in the Python community now wonder if OrderedDict is still useful. […]
Read morePython News: What’s New From March 2023
In March 2023, Python 3.12.0 alpha 6 was released! With several exciting new features, improvements, and optimizations, this release is a must-try for all Python enthusiasts. If you want to stay on the cutting edge of Python development, then you should really take it for a spin. But keep in mind that this release isnât recommended for production. The Python community has been buzzing with activities and events. PyCascades 2023 took place in Vancouver, British Columbia. The event featured talks […]
Read morePolars for initial data analysis, Polars for production
Initial data analysis (IDA) has different goals than your final, production data analysis: With IDA you need to examine the initial data and intermediate results, check your assumptions, and try different approaches. Exploratory data analysis has similar requirements. Once youâre happy with your approach, and youâre ready to run the analysis in an automated manner, you care a lot more about speed and resource usage. These different goals often benefit from different implementation strategies and toolsâunless you have a sufficiently […]
Read morePython 3.12 Preview: Ever Better Error Messages
Python 3.12 will be released in October 2023. Even though October is still months away, you can already preview some of the upcoming features, including how Python 3.12 will offer even more readable and actionable error messages. In this tutorial, youâll: Experience the improved communication in various error situations Learn about the background and limitations of these changes Peek into the CPython source code of the pull requests that made these error messages sparkle There are many other improvements and […]
Read more