Explain Codes LogoExplain Codes Logo

Python

Sorting a Python list by two fields

python
multiple-field-sorting
custom-sorting-functions
performance-optimization

Sibling package imports

python
best-practices
import-protocols
project-structure

Showing the stack trace from a running Python application

python
debugging
stack-trace
signal-handling

Show distinct column values in pyspark dataframe

python
pandas
dataframe
distinct-values

Set variable in Jinja

python
jinja-templates
variable-scoping
conditional-statements

Setting the correct encoding when piping stdout in Python

python
encoding
stdout
unicode

Setting an environment variable in virtualenv

python
venv
environment-variables
virtualenvwrapper

Set markers for individual points on a line

python
matplotlib
plotting
annotations

Serializing class instance to JSON

python
serialization
json-encoder
custom-serializers

Serialising an Enum member to JSON

python
enum
serialization
json

Select DataFrame rows between two dates

python
dataframe
datetime
pandas

Seaborn plots not showing up

python
matplotlib
seaborn
plotting

Saving a Numpy array as an image

python
image-processing
numpy
opencv

Saving an Object (Data persistence)

python
serialization
pandas
data-persistence

Save Dataframe to csv directly to s3 Python

python
dataframe
s3fs
pandas

Run certain code every n seconds

python
timers
apscheduler
threading

Reverse colormap in matplotlib

python
matplotlib
colormap
data-visualization

Return multiple columns from pandas apply()

python
pandas
apply
performance

Return HTTP status code 201 in flask

python
http-status-codes
flask-api
response-formatting

Retrieving parameters from a URL

python
url-parsing
parameter-retrieval
python-stdlib