Explain Codes LogoExplain Codes Logo

Python

How do I print to console in pytest?

python
pytest
testing
output-capturing

"userwarning: Matplotlib is currently using agg, which is a non-GUI backend, so cannot show the figure." when plotting figure with pyplot on Pycharm

python
matplotlib
backend
tkinter

Difference between __getattr__ and __getattribute__

python
magic-methods
attribute-access
python-3

Is there a short contains function for lists?

python
performance
collections
best-practices

How to install Python MySQLdb module using pip?

python
pip-installation
mysql-python
dependency-management

Pretty-print a NumPy array without scientific notation and with given precision

python
prompt-engineering
functions
dataframe

Fastest way to get the first object from a queryset in Django?

python
django-queries
optimization
best-practices

How to join two sets in one line without using "|"

python
set-union
python-sets
data-structures

Cannot install Lxml on Mac OS X 10.9

python
virtual-environments
installation-troubleshooting
best-practices

Does Python have an ordered set?

python
ordered-set
data-structure
collections

How to split a dataframe string column into two columns?

python
dataframe
regex
extract

Use 'import module' or 'from module import'?

python
best-practices
readability
namespace-conflicts

How to Replace Multiple Substrings of a String?

python
regex
string-replacement
optimization

How to adjust padding with cutoff or overlapping labels

python
matplotlib
plotting
data-visualization

What does enumerate() mean?

python
enumerate
functions
best-practices

Cmd opens Windows Store when I type 'python'

python
environment-variables
path-priority
python-installation

How do I put a variable’s value inside a string (interpolate it into the string)?

python
string-interpolation
f-strings
string-formatting

Check if string matches pattern

python
string-validation
regex-patterns
pythonic-strings

Can "list_display" in a Django ModelAdmin display attributes of ForeignKey fields?

python
django-admin
select_related
prefetch_related

How to use a dot "." to access members of a dictionary?

python
prompt-engineering
functions
collections