Class: Hash
- Inherits:
-
Object
- Object
- Hash
- Defined in:
- (unknown)
Instance Method Summary collapse
-
#value_counts(normalize: false, sort: true, ascending: false, dropna: true) ⇒ Hash
Returns a hash that contains the counts of values in
hash.
Instance Method Details
#value_counts(normalize: false, sort: true, ascending: false, dropna: true) ⇒ Hash
Returns a hash that contains the counts of values in hash.
This method treats nil and NaN, the objects who respond true to nan?,
as the same thing, and stores the count of them as the value for nil.
2179 2180 2181 2182 2183 |
# File 'ext/enumerable/statistics/extension/statistics.c', line 2179 static VALUE hash_value_counts(int argc, VALUE* argv, VALUE hash) { return any_value_counts(argc, argv, hash, hash_value_counts_without_sort); } |