$ show PacktPublishing/Python-Feature-Engineering-Cookbook
This repository is a companion to the Packt book 'Python Feature Engineering Cookbook' by Soledad Galli. It contains over 70 Jupyter notebooks organized by chapter, each demonstrating a specific feature engineering technique for machine learning, including missing data imputation, categorical encoding, variable transformation, discretization, outlier handling, date/time features, scaling, feature creation, and text feature extraction. The notebooks use public datasets (Titanic, Boston Housing, Credit Approval UCI, 20 Newsgroups) and implement techniques both manually with pandas and using specialized libraries like feature_engine, category_encoders, and featuretools. While educational and self-contained, the code is not production-grade and relies on outdated library versions and deprecated datasets (e.g., load_boston), making it a tutorial resource rather than a reusable software project. The repository is staleβlast updated around 2020βwith no ongoing maintenance, and missing dependencies (e.g., category_encoders not listed in requirements.txt) further reduce reproducibility.
The LLM identified 2 files worth highlighting for reuse:
A reusable helper function `diagnostic_plots(df, variable)` that takes a DataFrame and a variable name, and produces a histogram and a Q-Q plot for distribution inspection. This is a clean, self-contained pattern applicable to any data profiling task, easily extractable into a standalone utility module.
Demonstrates wrapping `scipy.signal.find_peaks` as a custom Featuretools primitive with `return_type=Numeric` to count local maxima/minima. This pattern shows non-obvious skill in automated feature engineering for time-series data, and can be extracted and reused for any dataset where peak/valley counts are meaningful features.