Table Of Contents

Commands frame/bin_column_equal_width

Classify column into same-width groups.

POST /v1/commands/

GET /v1/commands/:id

Request

Route

POST /v1/commands/

Body

name:

frame/bin_column_equal_width

arguments:

frame : Frame

Identifier for the input dataframe.

column_name : unicode

The column whose values are to be binned.

num_bins : int32 (default=None)

The maximum number of bins. Default is the Square-root choice \lfloor \sqrt{m} \rfloor, where m is the number of rows.

bin_column_name : unicode (default=None)

The name for the new column holding the grouping labels. Default is <column_name>_binned.


Headers

Authorization: test_api_key_1
Content-type: application/json

Description

Group rows of data based on the value in a single column and add a label to identify grouping.

Equal width binning places column values into groups such that the values in each group fall within the same interval and the interval width for each group is equal.

Notes

  1. Unicode in column names is not supported and will likely cause the drop_frames() method (and others) to fail!
  2. The num_bins parameter is considered to be the maximum permissible number of bins because the data may dictate fewer bins. For example, if the column to be binned has 10 elements with only 2 distinct values and the num_bins parameter is greater than 2, then the number of actual number of bins will only be 2. This is due to a restriction that elements with an identical value must belong to the same bin.

Response

Status

200 OK

Body

Returns information about the command. See the Response Body for Get Command here below. It is the same.

GET /v1/commands/:id

Request

Route

GET /v1/commands/18

Body

(None)

Headers

Authorization: test_api_key_1
Content-type: application/json

Response

Status

200 OK

Body

dict

A list of the edges of each bin.