Cannot Create Decimal Series using Series initializer
simbasdad opened this issue · 1 comments
simbasdad commented
This is a follow up to #21.
As far as I can tell, there's no way to use the Series
initializer (or cast) to construct a dataframe with a Decimal
datatype.
Polars::Series.new("revenue", raw_table[:revenue], dtype: :decimal)
Polars::Series.new("revenue", raw_table[:revenue], dtype: Polars::Decimal)
both obvious fail because there is not currently a decimal datatype.
Polars::Series.new("revenue", raw_table[:revenue].map { |r| BigDecimal(r, 10) } )
constructs a series, but the type is object
.
Currently we only need this for testing purposes to verify that our production code will indeed work with Decimal columns after updating to 0.5.1.