Information
[](https://packt.link/algotradingpython)
## Machine Learning Summit 2025 **Bridging Theory and Practice: ML Solutions for Today’s Challenges** 3 days, 20+ experts, and 25+ tech sessions and talks covering critical aspects of: - **Agentic and Generative AI** - **Applied Machine Learning in the Real World** - **ML Engineering and Optimization** [Book your ticket now >>](https://packt.link/mlsumgh) --- ## Join Our Newsletters ### DataPro *The future of AI is unfolding. Don’t fall behind.* Stay ahead with [**DataPro**](https://landing.packtpub.com/subscribe-datapronewsletter/?link_from_packtlink=yes), the free weekly newsletter for data scientists, AI/ML researchers, and data engineers. From trending tools like **PyTorch**, **scikit-learn**, **XGBoost**, and **BentoML** to hands-on insights on **database optimization** and real-world **ML workflows**, you’ll get what matters, fast. > Stay sharp with [DataPro](https://landing.packtpub.com/subscribe-datapronewsletter/?link_from_packtlink=yes). Join **115K+ data professionals** who never miss a beat. --- ### BIPro *Business runs on data. Make sure yours tells the right story.* [**BIPro**](https://landing.packtpub.com/subscribe-bipro-newsletter/?link_from_packtlink=yes) is your free weekly newsletter for BI professionals, analysts, and data leaders. Get practical tips on **dashboarding**, **data visualization**, and **analytics strategy** with tools like **Power BI**, **Tableau**, **Looker**, **SQL**, and **dbt**. > Get smarter with [BIPro](https://landing.packtpub.com/subscribe-bipro-newsletter/?link_from_packtlink=yes). Trusted by **35K+ BI professionals**, see what you’re missing. # Python Feature Engineering Cookbook
This is the code repository for [Python Feature Engineering Cookbook](https://www.packtpub.com/en-us/product/python-feature-engineering-cookbook-9781835883587), published by Packt.
**A complete guide to crafting powerful features for your machine learning models**
## What is this book about?
Python Feature Engineering Cookbook, Third Edition, walks you through tools and methods to craft powerful features from tabular, transactional, and time-series data for robust machine learning models.
This book covers the following exciting features:
* Discover multiple methods to impute missing data effectively
* Encode categorical variables while tackling high cardinality
* Find out how to properly transform, discretize, and scale your variables
* Automate feature extraction from date and time data
* Combine variables strategically to create new and powerful features
* Extract features from transactional data and time series
* Learn methods to extract meaningful features from text data
If you feel this book is for you, get your [copy](https://www.amazon.com/Python-Feature-Engineering-Cookbook-complete/dp/B0DBQDG7SG/ref=sr_1_1?crid=SFOV7IIWIKB2&dib=eyJ2IjoiMSJ9.BbOxXLgwxZR12U1cmMQL4VlZ-s3cED5k6C6FfqsL1CJRFM0-iLCBl4NTe87JmRDRxfi0H-xJMIME-Znypzw2_qRIOVIX0GLTHxSlus21hyvRNvFebmM6_J38ETWNmHsMJGny7R2kufSSWGZELRA5GjKOizqdmUwuLrHM_N4Ar7bRxC1gRH0yYQcVrWVMYpUwCOXZd6tb7KT99YQynRe7PRUO62VnBnBikygPsAnMuiI.-6PWjpxhzgn7WV8O0dQf8-nIuX0vpBYY46EXIChr6oE&dib_tag=se&keywords=python+Feature+Engineering+Cookbook&qid=1724220769&sprefix=python+feature+engineering+cookbook%2Caps%2C536&sr=8-1) today!
## Instructions and Navigations
All of the code is organized into folders.
The code will look like the following:
\`\`\`
date = "2024-05-17"
rng_hr = pd.date_range(date, periods=20, freq="h")
rng_month = pd.date_range(date, periods=20, freq="ME")
df = pd.DataFrame(\{"date1": rng_hr, "date2": rng_month\})
\`\`\`
**Following is what you need for this book:**
If you're a machine learning or data science enthusiast who wants to learn more about feature engineering, data preprocessing, and how to optimize these tasks, this book is for you. If you already know the basics of feature engineering and are looking to learn more advanced methods to craft powerful features, this book will help you. You should have basic knowledge of Python programming and machine learning to get started.
With the following software and hardware list you can run all code files present in the book (Chapter 1-11).
### Software and Hardware List
| Chapter | Software required | OS required |
| -------- | -------------------------------------------------------------------------------------| -----------------------------------|
| 1-11 | Python 3.9 or greater Windows, macOS, or Linux | Windows, Mac OS X, and Linux (Any) |
### Related products


