Explain Codes LogoExplain Codes Logo

Python

Python 3: ImportError "No Module named Setuptools"

python
importerror
setuptools
pip

How do I do a case-insensitive string comparison?

python
case-insensitive-comparison
unicode-normalization
python-string-methods

Why is "except: pass" a bad programming practice?

python
exception-handling
best-practices
pythonic-code

How to get last items of a list in Python?

python
slice
negative-indexing
iterables

How to create a file name with the current date & time in Python?

python
time-module
datetime-module
file-system

How to print a dictionary's key?

python
dataframe
collections
best-practices

Relative paths in Python

python
pathlib
os-module
file-handling

Why use Abstract Base Classes in Python?

python
abstract-classes
method-signatures
type-hinting

How to get the seconds since epoch from the time + date output of gmtime()?

python
prompt-engineering
datetime
timestamp

Scatter plot with different text at each data point

python
matplotlib
scatter-plot
data-labeling

Relative imports in Python 3

python
relative-imports
package-structure
import-strategy

Python logging: use milliseconds in time format

python
logging
datetime
custom-formatter

Putting a simple if-then-else statement on one line

python
ternary-operator
code-readability
syntactic-sugar

Plot two histograms on single chart

python
histograms
matplotlib
data-visualization

Filtering Pandas DataFrames on dates

python
pandas
dataframe
datetime

How do I sort a dictionary by value?

python
sorting
dictionaries
dataframe

Python Pandas Error tokenizing data

python
error-handling
csv-module
pandas-read-csv

How to find out if a Python object is a string?

python
type-checking
duck-typing
python-3

How do I split a list into equally-sized chunks?

python
list-chunking
memory-efficiency
performance-optimization

Class has no objects member

python
pylint
django
orm