Installing Packages in a Jupyter Notebook


This post describes a trick for installing/upgrading Python packages in a Jupyter notebook. It’s useful for scratch code, but don’t do this when you need reproducible code.

Combinations in Python


There are lots of ways to generate combinations in Python. This post will show you all of them.

How to Force pip to Reinstall a Package


Once in a while, a Python package gets corrupted on your machine and you need to force pip to reinstall it. As of pip 10.0, you can run the following…

Object Spread Operator for Python

Posted 2019-03-17 • Updated 2020-01-13

The object spread operator is a useful pattern in JavaScript. You can do something similar in Python.

Changing the Python Version in Conda

Posted 2017-03-09 • Updated 2021-01-25

The latest version of Anaconda comes with Python 3.8. But sometimes you need to use an earlier release.