Explain Codes LogoExplain Codes Logo

Python

How to handle errors with boto3?

python
error-handling
boto3
aws

Extracting extension from filename in Python

python
file-manipulation
pathlib
best-practices

Configure Flask dev server to be visible across the network

python
flask
networking
firewall

Pandas: merge (join) two data frames on multiple columns

python
pandas
merge
dataframe

Display number with leading zeros

python
zero-padding
f-strings
string-formatting

Simple argparse example wanted: 1 argument, 3 results

python
argparse
command-line
input-validation

What do __init__ and self do in Python?

python
self
init
instance-variables

How do I sort a dictionary by key?

python
dictionary-sorting
lambda
sortedcontainers

How do I make a time delay?

python
time-delay
asyncio
selenium

Parsing boolean values with argparse

python
argparse
boolean-arguments
command-line

How can I specify the function type in my type hints?

python
type-hints
callable
protocol

Get name of current script in Python

python
script-name
pathlib
sys-argv

How do I detect whether a variable is a function?

python
function-detection
callable
introspection

Can I remove script tags with BeautifulSoup?

python
beautifulsoup
html-manipulation
script-removal

Change column type in pandas

python
pandas
dataframe
type-conversion

Can Flask have optional URL parameters?

python
flask
optional-parameters
restful

Extract file name from path, no matter what the os/path format

python
filename-extraction
pathlib
cross-platform

How to install psycopg2 with "pip" on Python?

python
psycopg2
virtualenv
installation

How do I reverse a list or loop over it backwards?

python
list-reversal
memory-management
performance

Filter dict to contain only certain keys?

python
filtering
dictionary-comprehension
lambda