narwhals-dev / narwhals

Lightweight and extensible compatibility layer between Polars, pandas, cuDF, Modin, and more!
https://narwhals-dev.github.io/narwhals/
MIT License
218 stars 31 forks source link

[Enh]: DataFrame.collect_schema and LazyFrame.collect_schema #313

Open MarcoGorelli opened 1 week ago

MarcoGorelli commented 1 week ago

We would like to learn about your use case. For example, if this feature is needed to adopt Narwhals in an open source project, could you please enter the link to it below?

Polars 1.0 is about to come out, and it will have collect_schema. We should add it here too

https://docs.pola.rs/api/python/dev/reference/lazyframe/api/polars.LazyFrame.collect_schema.html#polars.LazyFrame.collect_schema

Please describe the purpose of the new feature or describe the problem to solve.

Polars 1.0 compatibility

Suggest a solution if possible.

No response

If you have tried alternatives, please describe them below.

No response

Additional information that may help us understand your needs.

No response

mfonekpo commented 1 week ago

I will work on this @MarcoGorelli

mfonekpo commented 1 week ago

Please can you give me some pointers on how to go about this? Thank you.

MarcoGorelli commented 1 week ago

thanks for your interest - I'd suggest focusing on https://github.com/narwhals-dev/narwhals/pull/312#pullrequestreview-2129724430 until that's finished