Module: Arrow::ArrayComputable
- Included in:
- Array, ChunkedArray
- Defined in:
- lib/arrow/array-computable.rb
Instance Method Summary collapse
-
#index(value) ⇒ Integer
Finds the index of the first occurrence of a given value.
- #max(options: nil) ⇒ Object
- #min(options: nil) ⇒ Object
- #uniq ⇒ Object
Instance Method Details
#index(value) ⇒ Integer
Finds the index of the first occurrence of a given value.
40 41 42 43 |
# File 'lib/arrow/array-computable.rb', line 40 def index(value) value = Scalar.resolve(value, value_data_type) compute("index", options: {value: value}).value end |
#max(options: nil) ⇒ Object
24 25 26 |
# File 'lib/arrow/array-computable.rb', line 24 def max(options: nil) compute("max", options: ).value end |
#min(options: nil) ⇒ Object
20 21 22 |
# File 'lib/arrow/array-computable.rb', line 20 def min(options: nil) compute("min", options: ).value end |
#uniq ⇒ Object
28 29 30 |
# File 'lib/arrow/array-computable.rb', line 28 def uniq unique.values end |