Creating a dataframe from no data seems inconsistent
Nobody has claimed this yet.
Assessment
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Newbie friendliness
- 35/100
Research direction
Start with the Explorer.DataFrame.new calls shown in the issue, comparing the empty list with dtypes against the map containing an empty Explorer.Series. Trace how each constructor represents zero-row data, then make their results consistent and verify that the dataframe retains the product_family category column.
Written by the indexing model from the issue text.
Description
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 []
# >
- Dominant language
- Elixir
- Stars
- 1.3k
- Forks
- 155
- Avg merge
- 3d 12h
- Merged PRs (30d)
- 1
Contributor guide
No contributing guide indexed for this repository
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
More from elixir-explorer/explorer
-
Upgrade nx to 1.0 Open
Difficulty 2/5 1-3 hours Newbie friendliness 75/100
elixir-explorer/explorer#1162 ·
-
elixir-explorer/explorer#1147 · 3 reactions · 1 assignee ·
-
Difficulty 4/5 3-5 days Newbie friendliness 35/100
elixir-explorer/explorer#1143 ·
-
elixir-explorer/explorer#1141 · 1 assignee ·
-
Difficulty 4/5 3-5 days Newbie friendliness 35/100
elixir-explorer/explorer#1136 ·
All issues in elixir-explorer/explorer
Similar issues
-
Difficulty 2/5 1-3 hours Newbie friendliness 84/100
phoenixframework/phoenix#6847 ·
-
Difficulty 2/5 1-3 hours Newbie friendliness 78/100
-
Difficulty 2/5 1-3 hours Newbie friendliness 82/100
beyond-all-reason/teiserver#1584 ·
-
Difficulty 2/5 1-3 hours Newbie friendliness 88/100
ash-project/ash#2954 ·
-
Difficulty 2/5 1-3 hours Newbie friendliness 86/100
membraneframework/boombox#149 ·