Module: Polars::Convert
- Included in:
- Polars
- Defined in:
- lib/polars/convert.rb
Instance Method Summary collapse
-
#from_hash(data, schema: nil, columns: nil) ⇒ DataFrame
Construct a DataFrame from a hash of arrays.
Instance Method Details
#from_hash(data, schema: nil, columns: nil) ⇒ DataFrame
Construct a DataFrame from a hash of arrays.
This operation clones data, unless you pass in a Hash<String, Series>
.
39 40 41 42 43 44 45 46 |
# File 'lib/polars/convert.rb', line 39 def from_hash(data, schema: nil, columns: nil) Utils.wrap_df( DataFrame.hash_to_rbdf( data, schema: schema || columns ) ) end |