Last active
August 26, 2020 06:57
-
-
Save satkr7/b5227187a99b5d82ee01ba7b45d7f3cb to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import pandas as pd | |
# load height-weight dataset downloaded from kaggle | |
data = pd.read_csv("weight-height.csv") | |
#equal width binning | |
data["ewb"] = pd.cut(data["Height"], bins=10) | |
#equal frequency binning | |
data["efb"] = pd.qcut(data["Height"], q=10) | |
print(data["ewb"].value_counts()) | |
print(data["efb"].value_counts()) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment