polars icon indicating copy to clipboard operation
polars copied to clipboard

docs(python): Add description and example of what happens when ignore_nulls=True on pl.concat_str

Open bertiewooster opened this issue 1 year ago • 4 comments

Addresses #16814 on https://docs.pola.rs/py-polars/html/reference/expressions/api/polars.concat_str.html#polars.concat_str. (Other than changing the font, which is a larger decision.)

bertiewooster avatar Jun 12 '24 00:06 bertiewooster

Codecov Report

All modified and coverable lines are covered by tests :white_check_mark:

Project coverage is 80.84%. Comparing base (0b0af39) to head (3865dcb). Report is 184 commits behind head on main.

Additional details and impacted files
@@            Coverage Diff             @@
##             main   #16889      +/-   ##
==========================================
- Coverage   81.33%   80.84%   -0.49%     
==========================================
  Files        1425     1466      +41     
  Lines      187867   192324    +4457     
  Branches     2702     2745      +43     
==========================================
+ Hits       152797   155481    +2684     
- Misses      34574    36340    +1766     
- Partials      496      503       +7     

:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Have feedback on the report? Share it here.

codecov[bot] avatar Jun 12 '24 01:06 codecov[bot]

@DeflateAwning does this address the issue?

bertiewooster avatar Jun 27 '24 01:06 bertiewooster

The example looks great! Assuming executing that example works as indicated, I believe your description is actually wrong.

You wrote:

If True, null values will be propagated and will appear to be empty strings.

In reality:

If True, null values are removed from the input list before concatenation.

Issues:

  • "Propogated" means "passed up to the caller, thus making the output cell null"
  • "Appear to be empty strings" would mean that the delimeter is duplicated.

DeflateAwning avatar Jun 27 '24 20:06 DeflateAwning

Good catch; I wasn't thinking about the separator. I corrected the description. BTW, to pass the doctests, the code example output has to be correct.

bertiewooster avatar Jun 27 '24 22:06 bertiewooster

Request final review and, if approved, merging on this PR. It was endorsed by the original requestor. Thanks!

bertiewooster avatar Jul 20 '24 18:07 bertiewooster