Open ericvdtoorn opened 2 weeks ago
It was not clear to me that pl.format would make the entire column null when one of the arguments is null. i.e.
pl.format
df = pl.DataFrame({ "a": [1,2,3,4], "b": [5,6,None,8] }) df.with_columns( ab=pl.format("{}_{}", c("a"), c("b")) )
I originally expected a null to either a) throw an error or b) insert null. If this is intended behaviour, I believe that should be made explicit in the documentation to avoid tripping over this silent error.
https://docs.pola.rs/py-polars/html/reference/expressions/api/polars.format.html#polars.format
Description
It was not clear to me that
pl.format
would make the entire column null when one of the arguments is null. i.e.I originally expected a null to either a) throw an error or b) insert null. If this is intended behaviour, I believe that should be made explicit in the documentation to avoid tripping over this silent error.
Link
https://docs.pola.rs/py-polars/html/reference/expressions/api/polars.format.html#polars.format