Create buckets - Number

Create buckets - Number


The bucketing transformation groups values in multiple ranges or buckets for easier understanding of highly scaled data. The granular details of such data can prevent us from getting a broad view of the data. This form of grouping values in a range not only helps in observing the overall view of the data, but also in finding data patterns.  

Bucketing works on the top of the base data types: Number, Text, and Date. 

To find bucketing operation:
  1. Right-click the column in the Operations page. 
  2. Select Create Buckets option from the context menu. 

Bucketing in a number column

Buckets can be formed in two ways in a numeric column: Automatic and Manual .  

Automatic bucketing

Automatic bucketing creates buckets based on the column data pattern and the number of buckets required.
You can edit this value under the Number of buckets option. By default, the automatic bucketing option creates ten buckets.

To apply Automatic bucketing in a column:  
  1. Right-click the column in the Operations page .  
  2. Select Create Buckets option from the context menu.  
  3. Give a name to your new column under Base column name. 
  4. In the Operations panel, the Automatic  option In the Operations panel, the Automatic  option is selected by default. 
  5. By default, the value for Number of buckets is ten. You can edit the value as per your requirement. 
  6. The auto bucketing option groups each value by taking the lowest and the highest values from the column, and divides it by the number of buckets chosen. 
  7. Preview of the resultant column is shown in the data grid.
  8. Click Apply



Manual bucketing 

Manual bucketing requires input from the user, such as the range values and associated conditions. 
To apply Manual bucketing in a column:  
  1. Right-click the column in the Operations page. 
  2. Select the Create Buckets option from the context menu. 
  3. In the Operations  panel, the option Automatic is selected by default. Choose the Manual option .
  4. Select one of the bucketing methods. 
    1. Fixed intervals
    2. Custom range
    3. Specific values
  5. Give a name to your new column under Base column name
  6. Enter the conditions, interval size, and labels as required for the selected bucketing method. 
  7. A preview of the resultant column will be shown in the data grid.
  8. Click Apply.  

Fixed intervals 

You can input the interval size using the Fixed intervals option. 
  1. For example, if the selected numerical column has data between 0 to 100, and the interval size is given as 10, the created range of intervals i.e. bucket values will be 0-9, 10-19, 20-29, and so on till 90-99. 
  1. In the newly created column, the bucket values are placed against each value in the selected numerical column that fits in a particular interval.  
  1. If a numerical column has some invalid data such as text or date values, then the resultant column will have 'NA'. 



Custom range

Using the Custom range, you can input the conditions to determine bucket labels. 
For example, if the numerical column has age data between 0 to 100, you can input the conditions in such a way that more than 0 and less than 13 falls under the bucket label "Child", equal to or more than 13, and less than 19 falls under the label "Teens", more than 19 and less than 60 falls under the label "Adults", and finally, greater than 60 will fall under the label "Senior citizens". 

This is accomplished by providing conditions using these comparative operators:

  1. Equal to (=), More than (>), More than or equal to (>=), as part of the Start condition, and
  2. Less than (<), Less than or equal to (<=), as part of the End condition

If the selected column has values that won't fit in any condition, it is marked with a separate label 'NA'.
You can edit this label under the Label for unmatched values option. 

Use the + button to add another condition below the current one, or the - button to delete the current condition. 

In the newly created column, the buckets are placed against each value in the selected numerical column that fits in a particular range. 



Specific values

Using the Specific values option, you can enter specific values from the selected numerical column and label them as a bucket. 

For example, if the selected numeric column is "Item code", you can create a new column "Category", and define the condition such that the item codes 101 and 102 fall under the bucket "Books", 201 and 202 fall under the bucket "Magazines", and 301, 302, and 303 fall under the bucket "Pens". You can leave the default label for unmatched values as NA.  

The values that were selected inside the "in" conditions will have the appropriate label defined in the new column. The ones that do not match the condition will have the default value: NA. 

Item
Item code
Category
 
 Gandhi's Biography
 101
 Books
 
 Parker Frontier Stainless Steel   Roller Ball

 301
  Pens
 
 Startup city India



 202
 Magazines
 
 Murder on the Orient express

 103
 Books
 
 Pens Coca-cola

 789
 N/A

 







    Zoho DataPrep Personalized Demo

    If you'd like a personalized walk-through of our data preparation tool, please request a demo and we'll be happy to show you how to get the best out of Zoho DataPrep.

    Zoho CRM Training

      Create, share, and deliver

      beautiful slides from anywhere.

      Get Started Now





              Zoho CRM Training Programs

              Learn how to use the best tools for sales force automation and better customer engagement from Zoho's implementation specialists.

              Zoho CRM Training

                Zoho SalesIQ Resources



                    Zoho TeamInbox Resources




                              Zoho DataPrep Resources

                                Zoho DataPrep Demo

                                Get a personalized demo or POC

                                REGISTER NOW


                                  Design. Discuss. Deliver.

                                  Create visually engaging stories with Zoho Show.

                                  Get Started Now











                                                        • Related Articles

                                                        • Create buckets - Date

                                                          You can classify a group of date values or individual dates using the bucketing technique.   The bucketing options for a date column are: Weekday or not Month of the year
 Week of the year
 Week of the month
 Day of the year
 Day of the month Minute ...
                                                        • Create buckets - Text

                                                          You can choose to implement bucketing in a text column using conditions. Consider a situation where you need to assign people to specific teams. You can implement the logic of adding values to a bucket, which in this case is the team name.  Name Team ...
                                                        • Change number format

                                                          DataPrep allows different regional formats for numbers. For example, in India, one million is written as 10,00,000 whereas, in the United States, it is written as 1,000,000. To change the format of numerical values: Right-click the numerical column ...
                                                        • Create workspace and add new dataset

                                                          To import data, you need to create a new workspace, or open an existing workspace and add a dataset. To import data:  1. Create a new workspace from the home page. Alternatively, you can select an existing workspace if you have one, and create ...
                                                        • User roles and permissions in Zoho DataPrep

                                                          Zoho DataPrep has roles for users based on their entity permissions. In other words, the user roles in DataPrep is based on the user's access to each entity. There are two other roles—Account admin and Organization admin—that are not entity-based. ...

                                                        Resources

                                                        Videos

                                                        Watch comprehensive videos on features and other important topics that will help you master Zoho CRM.



                                                        eBooks

                                                        Download free eBooks and access a range of topics to get deeper insight on successfully using Zoho CRM.



                                                        Webinars

                                                        Sign up for our webinars and learn the Zoho CRM basics, from customization to sales force automation and more.



                                                        CRM Tips

                                                        Make the most of Zoho CRM with these useful tips.



                                                          Zoho Show Resources