Skip to content

Creating a dataframe from no data seems inconsistent #1137

@LostKobrakai

Description

@LostKobrakai

I would've expected both of those options to resolve to the latter result.

Explorer.DataFrame.new(
  [],
  dtypes: %{
    product_family: :category
  }
)

# #Explorer.DataFrame<
#   Polars[0 x 0]
# >

Explorer.DataFrame.new(%{
  product_family: Explorer.Series.from_list([], dtype: :category)
})

# #Explorer.DataFrame<
#   Polars[0 x 1]
#   product_family category []
# >

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions