Are you looking for a bit of order when working with dictionaries in Python? Are you aware that the Python dict has changed over the last several versions and now keeps items in order? Could you learn more about object-oriented programming in Python by comparing it to another language? This week on the show, David Amos is back, and he’s brought another batch of PyCoder’s Weekly articles and projects.
David covers a Real Python article about the differences between the OrderedDict versus a standard dictionary. We discuss a recent video course about how object-oriented programming in Python compares to Java.
We cover several other articles and projects from the Python community including, what is Werkzeug, building a full-text search engine in 150 lines of Python code, loading SQL data into pandas without running out of memory, how to beat the Berlin rental market with a Python script, replacing print with ice cream, and the new version of CircuitPython and Mu.
Course Spotlight: Python vs Java: Object Oriented Programming
In this step-by-step course, you’ll learn about the practical differences in Python vs Java for object-oriented programming. By the end, you’ll be able to apply your knowledge to Python, understand how to reinterpret your understanding of Java objects to Python, and use objects in a Pythonic way.
Topics:
Show Links:
OrderedDict vs dict in Python: The Right Tool for the Job – In this step-by-step tutorial, you’ll learn what Python’s OrderedDict is and how to use it in your code. You’ll also learn about the main differences between regular dictionaries and ordered dictionaries.
What is Werkzeug? – Have you ever noticed that when you install Flask a dependency called Werkzeug is also installed? Werkzeug provides a set of utilities for building a WSGI interface in Python, which is an important part of any web application. This article will take you on a deep dive of Werkzeug and show you exactly how it works so you can have a deeper understanding of Flask applications.
Building a Full-Text Search Engine in 150 Lines of Python Code – Go from data preparation to search engine in just a few lines of Python.
Loading SQL Data Into Pandas Without Running Out of Memory – If you need to load a bunch of SQL query results into a Pandas DataFrame, then you might run into a problem if there are enough rows in the SQL query’s results: it won’t fit in RAM. Panda’s read_sql() function has a batching option, but it loads all of the data into memory, too. So, how do you handle larger-than-memory queries with Pandas? This article will show you how!
How I Beat the Berlin Rental Market With a Python Script – Learn how one Python developer used a Python script to analyze the housing market in Berlin and predict when a property would be sold or when the price would be decreased. While the article doesn’t include a lot of technical details, it’s a great case study of how Python, its rich ecosystem, and a little creativity can turn solving a banal problem — like searching for a new house in a crowded market — into something fun and intellectually rewarding!
Python vs Java: Object Oriented Programming – You may have heard that “everything is an object in Python.” But what does that mean for doing object oriented programming? If you’re coming to Python with a Java background, you’ll want to check out this course to learn how to reinterpret your understanding of Java objects to Python, and use objects in a Pythonic way.
Projects:
Additional Links:
Level up your Python skills with our expert-led courses: