Explain Codes LogoExplain Codes Logo

Python

Iterating over dictionaries using 'for' loops

python
iterating-over-dictionaries
python-idioms
best-practices

Django datetime issues (default=datetime.now())

python
datetime
callable-defaults
timestamp

Error "(unicode error) 'unicodeescape' codec can't decode bytes in position 2-3: truncated \UXXXXXXXX escape"

python
unicode-error
file-path-handling
string-literals

How do I check the difference, in seconds, between two dates?

python
datetime
timestamp
date-string

Total memory used by Python process?

python
memory-management
performance-optimization
python-stdlib

How can I create an object and add attributes to it?

python
dynamic-objects
data-classes
mock-objects

Counting unique values in a column in pandas dataframe like in Qlik?

python
dataframe
pandas
data-analysis

Set value for particular cell in pandas DataFrame using index

python
dataframe
pandas
data-manipulation

How to delete an item in a list if it exists?

python
list-comprehension
try-except
performance

Split (explode) pandas dataframe string entry to separate rows

python
dataframe
pandas
data-science

Create Pandas DataFrame from a string

python
pandas
dataframe
data-cleaning

How to find elements by class

python
prompt-engineering
functions
collections

Convert Pandas Column to DateTime

python
pandas
datetime
dataframe

Count number of occurrences of a substring in a string

python
string-manipulation
regular-expressions
performance-optimization

Sqlalchemy default DateTime

python
timestamping
database-server
sqlalchemy

Writing string to a file on a new line every time

python
file-writing
newlines
buffering

How can I make one python file run another?

python
subprocess
import
script-execution

Pip install mysqlclient returns "fatal error C1083: Cannot open file: 'mysql.h': No such file or directory"

python
pip-install
mysqlclient
installation-troubleshooting

Converting a Pandas GroupBy output from Series to DataFrame

python
pandas
dataframe
groupby

How do I find out my PYTHONPATH using Python?

python
prompt-engineering
sys-path
python-environment-variable