Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

Does polars have N-D labelled arrays, and if so can it perform computations on them quickly? I've been thinking of moving from pandas to xarray [0], but might consider poplars too if it has some of that functionality.

[0] https://xarray.dev/



polars only has 1D columns, it's columnar just like pandas.

IME xarray and pandas have to be used together. Neither can do what the other does. (Well, some people try to use pandas for stuff that should be numpy or xarray tasks.)


Addendum: Polars doesn't even have index so no multiindex either. I haven't gotten deep enough into polars to understand why and what it breaks, but it feels wrong to replace pandas with something without index.


Indexes don't really do anything useful that's not covered by.group_by() and .over(). There is no loss of functionality.


Right, it's still possible. But less close to hand and never automatic. Series also become less useful when they are just a sequence instead of an almost mapping (with an index) or a sparse sequence (with subset of larger index)


No experience with polars, but I've had quite a positive experience with xarray.

I still use pandas for tabular data, but anytime I have to deal with ND data, xarray is a lifesaver. No more dealing with raw, unlabeled 5-D numpy arrays, trying to remember which dimension is what.




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: