
Explains how to one-hot encode list values stored in a pandas column using scikit-learn's MultiLabelBinarizer and merge the result back into the original DataFrame.

Explains how to one-hot encode list values stored in a pandas column using scikit-learn's MultiLabelBinarizer and merge the result back into the original DataFrame.

Explains how to expand equal-length lists stored in a pandas column into separate columns using apply with pd.Series, combined with pop and join.

Explains how to fill missing dates in time series sales data using pandas' date_range and reindex to generate a complete, evenly spaced date index.

Investigates why pandas' Series.std() and numpy's np.std() give different results by default, tracing it to their different default degrees of freedom (ddof).

Shows how to combine pandas' groupby with filter and a lambda to keep only the groups that satisfy a given condition, such as a minimum count.

Demonstrates how to unpack list and dictionary arguments using * and ** to pass multiple values to a function at once in Python.

Provides a personal matplotlib template for drawing publication-quality graphs, covering font and tick styling and laying out multiple subplots side by side.

Shows why np.mean and np.std return nan for arrays with NaN values, and how np.nanmean and np.nanstd compute the mean and standard deviation while ignoring them.

Shows how to use matplotlib-venn's venn2 and venn3 functions to create Venn diagrams that visualize overlaps between two or three datasets during EDA.

Explains a pandas pitfall where adding a Series column after dropna misaligns on the old index and introduces NaN values, and shows how reset_index fixes it.

Investigates why a Jupyter notebook kernel fails to load the intended conda environment and shows how to inspect kernel configuration files to find the cause.

Compares two ways to extract groupby results in pandas and shows that iterating directly over the groupby object is significantly faster than filtering by each unique value.

Explores how Python's garbage collection and reference counting work, using sys.getrefcount to observe how counts change as references are created and removed.

Provides a reusable LightGBM regression template covering data loading, model training, cross validation, test set evaluation, and feature analysis with SHAP.

Introduces PuLP for linear optimization in Python, showing how to define variables, an objective function, and constraints to solve a simple maximization problem.

Shows how to use the python-wordpress-xmlrpc library to programmatically create and publish WordPress posts, including setting tags, categories, and uploading images.

Shows how to use the tweepy library to build a simple bot that posts automatic tweets from Python, including reading API credentials from a config file.

Personal notes on Python's re module, covering compiling patterns with re.compile and the differences between match, search, findall, and finditer.

Explains Python's id() function for inspecting object memory addresses, showing how variable assignment, identical values, and reassignment affect object identity.

Demonstrates how to use Python's sys.getsizeof() function to check how much memory a specific object, such as a list, is using.