Method: Polars::StructExpr#field
- Defined in:
- lib/polars/struct_expr.rb
#field(name, *more_names) ⇒ Expr
Retrieve one of the fields of this Struct as a new Series.
67 68 69 70 71 72 73 74 75 76 |
# File 'lib/polars/struct_expr.rb', line 67 def field(name, *more_names) if more_names.any? name = (name.is_a?(::String) ? [name] : name) + more_names end if name.is_a?(::Array) return Utils.wrap_expr(_rbexpr.struct_multiple_fields(name)) end Utils.wrap_expr(_rbexpr.struct_field_by_name(name)) end |