Explain Codes LogoExplain Codes Logo

Python

Unicodedecodeerror when reading CSV file in Pandas

python
pandas
csv
encoding

How to disable Python warnings?

python
warnings
error-handling
logging

Django set default form values

python
form-handling
default-values
user-input

How do you test that a Python function throws an exception?

python
exception-handling
unittest
test-automation

Shuffle DataFrame rows

python
dataframe
shuffling
performance

Running Python on Windows for Node.js dependencies

python
node-gyp
windows-build-tools
environment-variables

Logger Configuration to Log to File and Print to STDOUT

python
logging
handlers
configuration

Create a Pandas Dataframe by appending one row at a time

python
dataframe
performance
data-transformation

How to set environment variables in Python?

python
environment-variables
dotenv
subprocess

How do I lowercase a string in Python?

python
string-manipulation
unicode
best-practices

What is Python's equivalent of && (logical-and) in an if-statement?

python
logical-operators
short-circuiting
pep8

Check if a given key already exists in a dictionary

python
key-checks
defaultdict
performance

Why dict.get(key) instead of dict[key]?

python
dict-get
error-handling
json

Strip HTML from strings in Python

python
html-stripping
beautifulsoup
xss

Timeout for python requests.get entire response

python
timeouts
requests
web-scraping

Finding what methods a Python object has

python
introspection
error-handling
methods

How can I make a dictionary (dict) from separate lists of keys and values?

python
zip-dict
memory-management
code-readability

Adding a method to an existing object instance in Python

python
dynamic-methods
code-maintenance
best-practices

How do I print the full NumPy array without truncation?

python
numpy
printoptions
data-structures

Join List of Lists in Python

python
flattening
itertools
performance