Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat(rust): Format null arrays in Series #11289

Merged
merged 7 commits into from
Oct 2, 2023
Merged

Conversation

romanovacca
Copy link
Contributor

@romanovacca romanovacca commented Sep 24, 2023

Resolves #7153

null array now is shown as:

shape: (2,)
Series: 'a' [nullarray]
[
        null
        null
] 

instead of

nullarray

Could refactor the code a bit cause it overlaps with format_array a lot, so there is quite some repitition, but made this PR to see if this is in the right direction at all.

@github-actions github-actions bot added enhancement New feature or an improvement of an existing feature rust Related to Rust Polars labels Sep 24, 2023
@romanovacca
Copy link
Contributor Author

CI failures seem unrelated?

@orlp
Copy link
Collaborator

orlp commented Sep 25, 2023

Can you rebase based on main? There's a lot of stuff in your PR that shouldn't be in there.

@romanovacca
Copy link
Contributor Author

Can you rebase based on main? There's a lot of stuff in your PR that shouldn't be in there.

Yeah i was fighting with that, never used rebase before. Should be good now!

@romanovacca
Copy link
Contributor Author

>>> df_null 
shape: (2, 1)
┌──────┐
│ a    │
│ ---  │
│ null │
╞══════╡
│ null │
│ null │
└──────┘


>>> df_null["a"]
shape: (2,)
Series: 'a' [null]
[
        null
        null
]
>>> 

@ritchie46
Copy link
Member

Thank you @romanovacca. Looks better indeed. :)

@ritchie46 ritchie46 merged commit c03d01a into pola-rs:main Oct 2, 2023
24 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or an improvement of an existing feature rust Related to Rust Polars
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Format null arrays in Series like other series and format pl.List(pl.Null) arrays properly in dataframes.
4 participants