You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Currently pycsvy manually implements different read and write functionality for a few different libraries (pandas, polars, numpy). There already exists a tool that unifies the API between some of these libraries, narwhals.
An easy first option here is to use write_csv for the write functions.
To be honest, I hadn't thought much further than what I've already written in here. But the kind of API you've suggested is along the lines of what I was imagining.
There's possibly a broader question about what is the best API for this tool in general, but for the sake of keeping the current behaviour consistent, your suggestion is what I was initially thinking.
Currently pycsvy manually implements different read and write functionality for a few different libraries (pandas, polars, numpy). There already exists a tool that unifies the API between some of these libraries, narwhals.
An easy first option here is to use write_csv for the write functions.
While there currently isn't a read_csv function in narwhals, there is an open issue discussing whether to implement one.
Another feature of narwhals that can be useful is it includes some tooling for checking array types and checking for successful imports that is currently done manually https://narwhals-dev.github.io/narwhals/api-reference/dependencies/#narwhals.dependencies.is_numpy_array
The text was updated successfully, but these errors were encountered: