Last active
May 4, 2020 15:27
-
-
Save Ze1598/bb87349091a822bd3843334ea42fc5a5 to your computer and use it in GitHub Desktop.
Bin data using custom intervals with pandas (integers): usage
This file contains hidden or 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
| ages = pd.Series(np.random.randint(low=0, high=99, size=200)) | |
| ages_binned = bin_ages(ages) | |
| plot_histogram( | |
| ages_binned, | |
| 10, | |
| "Ages binned", | |
| ["Ages", None] | |
| ) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment