EXPAND ALL
  • Home

bin

Takes the passed in value(s) and bin them to the nearest multiple of a bin.

Returns: INT64

The value rounded down to the nearest multiple of bin.

Arguments

VariableTypeDescription
valueINT64 / TIME64NS / FLOAT64The value to bin.
binINT64 / TIME64NSThe bin value to clip to.

Examples:

# bin column b to multiples of 50
df.a = px.bin(df.b, 50)
This site uses cookies to provide you with a better user experience. By using Pixie, you consent to our use of cookies.