When we are working with lists, dictionaries, and sets in Python, we have a special syntax, called comprehensions. This feature helps us to improve the readability of our code, providing compact syntax for deriving a new list from another iterable.
Category: Python
Playing with some Pandas functions and Airflow operators
Recently, I was dealing with a task where I had to import raw information into a staging PostgreSQL Database as part of a task in the Airflow DAG pipeline. I would like to share the approach used and exposes the valuable Pandas.json_normalize function and how it helps to prepare the data before importing. Reading the…
Using interpolated format strings in Python
The release of Python 3.6 came with exciting functionalities. I want to speak about the feature called interpolated format string – f-strings for short- through this quick post. This new feature allows us to have a more readable, concise and even faster way of formatting string, in short words: pythonic code.
Getting the last modified directory with Python
Working with os paths is a prevalent task, especially when working on a console application in Python. Recently, I had to add a change to an existing feature where it was mandatory to return the last modified directory on a specific target. In Python, we have the opportunity to count with different libraries; in this…