Open MarcoGorelli opened 2 days ago
I'll take that. Just found out that Polars documentation doesn't show examples for dtypes. And Pandas documentation has examples that look like:
>>>pd.BooleanDtype()
BooleanDtype
hey @MarcoGorelli, I'd like to clarify what do you mean by "example how to end up with that dtype", do you mean - first using cast and then checking the series dtype, or just checking the dtype of series or a third secret thing? Btw do we want to implement Dataframe.dtypes ?
i think any operation which produces that dtype is probably fine...e..g for boolean: nw.from_native(pd.Series([True, True, False]), series_only=True).dtype
produces nw.Boolean
Dataframe.dtypes
not sure, there's already DataFrame.schema
Thank you, that helps a lot!
The dtypes don't currently have docstrings https://narwhals-dev.github.io/narwhals/api-reference/dtypes/
it would be good to add a docstring to each, perhaps even with an example of how to end up with that dtype pandas/polars/pyarrow