Explain Codes LogoExplain Codes Logo

Python

How to leave/exit/deactivate a Python virtualenv

python
venv
bash
virtualenv

How to know which Python is running in Jupyter notebook?

python
prompt-engineering
venv
best-practices

How to keep keys/values in same order as declared?

python
collections
dataframe
pandas

How to join two generators (or other iterables) in Python?

python
generator-expressions
lazy-evaluation
iterators

How to install multiple python packages at once using pip

python
pip-installation
requirements-file
virtual-environment

How to import the class within the same directory or sub directory?

python
import-patterns
relative-imports
python-3

How to import module when a module name contains a '-' dash or hyphen?

python
importlib
pythonic-naming-conventions
module-import

How to hide output of subprocess

python
subprocess
error-handling
process-management

How to grab the first element in a list of tuples in Python?

python
list-extraction
tuple
python-stdlib

How to get UTC time in Python?

python
datetime
timezone
timestamp

How to get the position of a character in Python?

python
string-methods
performance-optimization
enumerate

How to get the latest file in a folder?

python
file-handling
pathlib
glob

How to get the caller's method name in the called method?

python
prompt-engineering
performance
best-practices

How to get string objects instead of Unicode from JSON

python
json-decoding
unicode-conversion
object-hook

How to get rid of "Unnamed: 0" column in a pandas DataFrame read in from CSV file?

python
dataframe
csv
pandas

How to get only the last part of a path in Python?

python
pathlib
os.path
file-management

How to get method parameter names?

python
debugging
introspection
pythonic-way

How to get indices of a sorted array in Python

python
list-comprehensions
numpy
performance-analysis

How to get HTML from a beautiful soup object

python
beautifulsoup
html-parsing
web-scraping

How to Get Current Available GPUs in TensorFlow?

python
gpu-memory
tensorflow-configuration
distributed-systems