Explain Codes LogoExplain Codes Logo

Python

Replacing column values in a pandas DataFrame

python
dataframe
pandas
vectorized

How to specify "nullable" return type with type hints

python
type-hints
nullable-types
dataclasses

Correct way to write line to file?

python
file-operations
best-practices
try-except-blocks

A non-blocking read on a subprocess.PIPE in Python

python
non-blocking-io
subprocess
asyncio

How can I check if a string represents an int, without using try/except?

python
functions
best-practices
performance

How to group dataframe rows into list in pandas groupby

python
dataframe
groupby
pandas

How to install lxml on Ubuntu

python
virtualenv
pip
dependencies

Best way to strip punctuation from a string

python
regex
string-manipulation
performance

Pretty-print an entire Pandas Series / DataFrame

python
pandas
dataframe
display-settings

How do I get the day of week given a date?

python
datetime
strftime
locale

How to filter Pandas dataframe using 'in' and 'not in' like in SQL

python
dataframe
list-comprehensions
performance

What do the Python file extensions, .pyc .pyd .pyo stand for?

python
bytecode
performance-boosting
file-extensions

Programmatically generate video or animated GIF in Python?

python
image-processing
gif-animation
imageio

How to embed an image or picture in Jupyter Notebook, either from a local machine or from a web resource?

python
markdown
image-embedding
jupyter-notebook

How to call a script from another script?

python
functions
modules
best-practices

How do I resize an image using PIL and maintain its aspect ratio?

python
image-processing
aspect-ratio
resampling

Simple way to measure cell execution time in IPython notebook

python
time-tracking
ipython-notebook
performance-optimization

How do I compare version numbers in Python?

python
version-comparison
packaging-version
best-practices

Removing Conda environment

python
conda
environment-management
version-control

Convert base-2 binary number string to int

python
bitwise-operations
binary-conversion
numpy-performance