Show HN: A Python container for dataclasses with multi-indexing and vector opps
github.com
github.com
Description: A Python dataclass container with multi-indexing and bulk operations. Provides the typed benefits and ergonomics of dataclasses while having the efficiency of Pandas dataframes.
The container is based on data-oriented design by optimising the memory layout of the stored data, providing fast bulk operations and a smaller memory footprint for large collections. Bulk operations are enabled using Pandas which has a rich set of vectorised methods for both numerical and string data types.
Does it support nested structs? Sometimes that's more natural than a flat struct.
It's just an abbreviated "with" so should be a forward slash ("w/") or, better imo, written out in full.
EDIT: And also "opps" isn't a very good way to abbreviate "operations", is it?
this, on the other hand, looks like something i might use to actually play with data and allow others to follow along.
The usual "solution" is to write custom wrapping code for this because it only supports 2D DataFrames, which is unacceptable for us because that would mean users would have to do it, so we'll take care of this too.
- [0]: https://github.com/mlflow/mlflow/issues/3570
- [1]: https://iko.ai
I just implemented a pandas-like api for one of my projects, but I wound up building it on top of sortedcontainers: https://paramtools.dev/api/viewing-data.html
I almost swapped over to using Pandas Series like what you did, but I went with something (I think) is lighter weight.
It's cool to see what an alternative implementation might have looked like!
I'm heavily relying on pandas frames for manipulating the data, and have been thinking of ways to make it type safe[r], will give your library a try!