Created
January 27, 2019 17:31
-
-
Save adiamaan92/740405b6405a6644fd16d3a50588de51 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
( | |
wine.pipe(csnap) | |
.rename(columns={"color_intensity": "ci"}) | |
.assign(color_filter=lambda x: np.where((x.hue > 1) & (x.ci > 7), 1, 0)) | |
.pipe(csnap) | |
.query("alcohol > 14") | |
.pipe(csnap) | |
.sort_values("alcohol", ascending=False) | |
.reset_index(drop=True) | |
.loc[:, ["alcohol", "ci", "hue"]] | |
.pipe(csnap, lambda x: x.sample(5)) | |
) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment