Explain Codes LogoExplain Codes Logo

Python

Creating a dictionary from a csv file?

python
dataframe
pandas
csv

How to replace whitespaces with underscore?

python
regex
functions
best-practices

How to skip iterations in a loop?

python
exception-handling
try-except
continue

Numpy Array Initialization (Fill With Identical Values)

python
numpy
array-initialization
performance-tips

How to check if a string in Python is in ASCII?

python
functions
unicode
encoding

How do I convert an IPython Notebook into a Python file via commandline?

python
jupyter
nbconvert
command-line

Anaconda Export Environment File

python
environment-variables
conda
environment-management

Does Python optimize tail recursion?

python
recursion
tail-call-optimization
debugging

How to cheaply count lines in a large file in Python?

python
prompt-engineering
performance
best-practices

Remove unwanted parts from strings in a column

python
pandas
lambda
dataframe

How to replace text in a string column of a Pandas dataframe?

python
pandas
dataframe
regex

How can I percent-encode URL parameters in Python?

python
url-encoding
python-3
urllib-parse

Is it bad to have my virtualenv directory inside my git repository?

python
venv
best-practices
tools

How do I implement interfaces in Python?

python
duck-typing
interface-definition
type-checking

How to convert an int to a hex string?

python
formatting-strings
hex-conversion
python-3

Python: How to ignore an exception and proceed?

python
exception-handling
best-practices
python-3

Automatically creating directories with file output

python
file-permissions
pathlib
cross-platform

Convert tuple to list and back

python
list
tuple
conversions

Dropping infinite values from dataframes in pandas?

python
dataframe
pandas
data-cleaning

How to suppress py.test internal deprecation warnings

python
pytest
warning-suppression
testing