We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
bins: should be an integer or an array of integers.
bins:
If an integer bins is given, the values are grouped into half-open bins.
bins
If an array of integers is given as bins, the array elements represent the lower limits of each bin. The array must increase monotonically.
>> [1, 2, 1, 1, 3, 4, 4, 5, 2, 6].value_counts(bins: 4) { (1.0 ... 2.25) => 5, (2.25 ... 3.5) => 1, (3.5 ... 4.75) => 2, (4.75 ... 6.005) => 2 } >> [1, 2, 1, 1, 3, 4, 4, 5, 2, 6].value_counts(bins: [1, 2, 3, 4, 5, 6], dropna: false) { (1 ... 2) => 3, (2 ... 3) => 2, (3 ... 4) => 1, (4 ... 5) => 2, (5 ... 6) => 1, nil => 1 } >> [1, 2, 1, 1, 3, 4, 4, 5, 2, 6].value_counts(bins: [1, 3, 5, 7]) { (1 ... 3) => 5, (3 ... 5) => 3, (5 ... 7) => 2 }
The text was updated successfully, but these errors were encountered:
No branches or pull requests
bins:
should be an integer or an array of integers.If an integer
bins
is given, the values are grouped into half-open bins.If an array of integers is given as
bins
, the array elements represent the lower limits of each bin. The array must increase monotonically.Example
The text was updated successfully, but these errors were encountered: