narwhals-dev / narwhals

Lightweight and extensible compatibility layer between dataframe libraries!
https://narwhals-dev.github.io/narwhals/
MIT License
611 stars 91 forks source link

docs: Make page about pandas null handling #1401

Open MarcoGorelli opened 6 days ago

MarcoGorelli commented 6 days ago

We sometimes reference pandas and Polars handling null values differently in docs, but it's a bit scattered - I think we should:

I'm not sure we should be including Polars examples which includes 'nan' - the reason is that 'nan' is quite rare to encounter in Polars. Missing values are represented by null, and you'd only get 'nan' if you did something "illegal" like divide 0 by 0

My concern is that otherwise we distract from the main behaviour of the function in question

MarcoGorelli commented 6 days ago

all_horizontal probably needs updating https://narwhals-dev.github.io/narwhals/api-reference/narwhals/#narwhals.all_horizontal, as it currently just says pandas and Polars handle null values differently.

and the example shows pandas with object dtype, whereas I think we should showcase boolean columns