---
title: "Discussion on \"types of feature engineering\" | Hashnode"
description: "Discussion on \"types of feature engineering\". 1. One-Hot Encoding\nimport pandas as pd\n\n# Sample DataFrame\ndf = pd.DataFrame({'Animal': ['Cat', 'Dog', 'Fish']})\n\n# One-Hot Encoding\ndf_one_hot = pd.get_dummies(df, columns=['Animal'], dtype=int)\nprint(df_one_hot)\n\nOutput:\n\n   Animal_Cat  Animal_Dog..."
url: "https://hashnode.com/posts/types-of-feature-engineering/674bf6dce4eeff67cf20e87a"
---

[Feed](https://hashnode.com/feed) /

Discussion

# [types of feature engineering](https://savvyshivam.hashnode.dev/types-of-feature-engineering?utm_source=hashnode&utm_medium=feed)

1\. One-Hot Encoding import pandas as pd # Sample DataFrame df = pd.DataFrame({'Animal': \['Cat', 'Dog', 'Fish'\]}) # One-Hot Encoding df\_one\_hot = pd.get\_dummies(df, columns=\['Animal'\], dtype=int) print(df\_one\_hot) Output: Animal\_Cat Animal\_Dog...

Dec 1, 2024 · 2 min read · savvyshivam.hashnode.dev  
Read the article

## Written by

[Shivam Kumar](https://hashnode.com/@savvyshivamm)

@savvyshivamm

  
[View profile](https://hashnode.com/@savvyshivamm)

Web Developer

## Responses

Markdown supported · ⌘↵ to post

No responses yet.
