Explain Codes LogoExplain Codes Logo

Python

How do you extract a column from a multi-dimensional array?

python
list-comprehension
numpy
data-extraction

How do I escape curly-brace ({}) characters in a string while using .format (or an f-string)?

python
formatting
strings
f-strings

How do I protect Python code from being read by users?

python
obfuscation
security-strategies
code-protection

Using OR in SQLAlchemy

python
sqlalchemy
database-queries
data-manipulation

Get the last day of the month

python
datetime
pandas
dateutil

How to change the font size on a matplotlib plot

python
matplotlib
font-properties
responsive-design

Python Progress Bar

python
progress-bar
tqdm
concurrency

Python: Number of rows affected by cursor.execute("SELECT ...")

python
sql-injection
parametrized-queries
fetch-strategy

Hidden features of Python

python
generator-expressions
tuple-unpacking
dynamic-attributes

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