and so on we can easily do this using what we learned in the "roundingsection earlier where we round off these raw age values by taking the floor value after dividing it by the following code depicts the same in [ ]fcc_survey_df['age_bin_round'np array(np floor(np array(fcc_survey_df['age'] )fcc_survey_df[['id ''age''age_bin_round']iloc[ : out[ ]id age age_bin_round aa fdb de fe fa fdd bd bf dc cdf dad aec ffbb fc ec we take specific slice of the dataset (rows - to depict users of varying ages you can see the corresponding bins for each age have been assigned based on rounding but what if we need more flexibilitywhat if want to decide and fix the bin widths myselfbinning based on custom ranges is the answer to the all our questions about fixed-width binningsome of which just mentioned let' define some custom age ranges for binning developer ages using the following scheme age range bin based on this custom binning schemewe will now label the bins for each developer age value with the help of the following code we will store both the bin range as well as the corresponding label in [ ]bin_ranges [ bin_names [ fcc_survey_df['age_bin_custom_range'pd cut(np array(fcc_survey_df['age'])bins=bin_rangesfcc_survey_df['age_bin_custom_label'pd cut(np array(fcc_survey_df['age'])bins=bin_rangeslabels=bin_namesfcc_survey_df[['id ''age''age_bin_round''age_bin_custom_range''age_bin_custom_label']iloc[ :