Method: Polars::ArrayNameSpace#first

Defined in:
lib/polars/array_name_space.rb

#firstSeries

Get the first value of the sub-arrays.

Examples:

s = Polars::Series.new(
  "a", [[1, 2, 3], [4, 5, 6], [7, 8, 9]], dtype: Polars::Array.new(Polars::Int32, 3)
)
s.arr.first
# =>
# shape: (3,)
# Series: 'a' [i32]
# [
#         1
#         4
#         7
# ]

Returns:



539
540
541
# File 'lib/polars/array_name_space.rb', line 539

def first
  super
end