Method: Polars::Convert#from_hash
- Defined in:
- lib/polars/convert.rb
permalink #from_hash(data, schema: nil, columns: nil) ⇒ DataFrame
Construct a DataFrame from a dictionary of sequences.
This operation clones data, unless you pass in a Hash<String, Series>
.
29 30 31 32 33 34 35 36 |
# File 'lib/polars/convert.rb', line 29 def from_hash(data, schema: nil, columns: nil) Utils.wrap_df( DataFrame.hash_to_rbdf( data, schema: schema || columns ) ) end |