Skip to content

Blog

Python Swap Variables Cover Image

3 Ways to Swap Variables in Python

Learn how to use Python to swap variables, including with and without a temporary variable and with arithmetic expressions.

Pandas Get Row Numbers Cover Image

Pandas: Get the Row Number from a Dataframe

Learn how to use Pandas to get the row number of rows matching a condition or multiple conditions, and how to count rows matching conditions.

How to Select Random Items from a List in Python Cover Image

Python: Select Random Element from a List

Learn how to use Python to choose a random list element, with and without replacement and how to replicate results with a random seed.