Python is a high-level programming language that consistently ranks as one of the most popular. As a glue language, it brings a simple API to performant libraries written in other languages. It is also one of the only languages I can rightfully claim to write idiomatic code in. I try my best to stick to the official style guide and normally read release notes as soon as they come out, so I can flex on other programmers by using the walrus operator :=.

Setup

Python can be installed with most package managers and even comes pre-installed on many Linux distributions, in more restrictive environments I normally build it from source using make to do an altinstall.

Virtual environments isolate your project from other projects in your system. While others exist, venv is the standard and most robust. To create and activate a venv:

python3.12 -m venv venv
source venv/bin/activate

It can be deactivate simply by typing deactivate.

Requirements

If you are knee deep in a project and need to package it, you can write out the dependencies to file using

pip freeze > requirements.txt

If you only want to ignore higher order dependencies, this command will give you a simple output for better flexibility

pip list --format=freeze --not-required

Pandas

Despite having ugly syntax compared to query languages, pandas is by far my favorite python package. It’s where the magic happens. I use it to clean data before passing it to plotly.

Plotly

Plotly makes beautiful graphs in a variety of formats, it requires some wrangling, but once the data is in the desired format it’s intuitive to turn columnar data for nerds into insightful graphs for executives.