Live data from Hacker News

Show HN: A Python container for dataclasses with multi-indexing and vector opps

github.com

11–16 of 16 posts

Re: Show HN: A Python container for dataclasses with multi-indexing and vector opps

#11
post #2

I came to the idea as I wanted to use the ergonomics and efficiency of Pandas DataFrames but realised it makes messy production code thats hard to maintain. This package provides the best of both worlds. 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…

Looks interesting; thanks for writing this!

Does it support nested structs? Sometimes that's more natural than a flat struct.

Re: Show HN: A Python container for dataclasses with multi-indexing and vector opps

#13
Very cool, seems like something I wanted to implement for my life dashboard (health/sleep/exercise/etc) https://github.com/karlicoss/dashboard

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!

Re: Show HN: A Python container for dataclasses with multi-indexing and vector opps

#14

This appears to be encroaching on Apache Arrow's territory (which notably is headed by the creator of Pandas): https://arrow.apache.org/

mmm, i wouldn't say that. arrow is really meant as a lower-level utility with usability abstractions layered on top. for low-level tasks, like serializing/deserializing, arrow is amazing, but if you want to actually explore or transform data, arrow's not really usable (based on about a day of trying).

this, on the other hand, looks like something i might use to actually play with data and allow others to follow along.

Re: Show HN: A Python container for dataclasses with multi-indexing and vector opps

#15
post #11
post #2

I came to the idea as I wanted to use the ergonomics and efficiency of Pandas DataFrames but realised it makes messy production code thats hard to maintain. This package provides the best of both worlds. 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…

Looks interesting; thanks for writing this! Does it support nested structs? Sometimes that's more natural than a flat struct.

Yes - you can use nested dataclasses. But you will loose some of the nice features

Re: Show HN: A Python container for dataclasses with multi-indexing and vector opps

#16

I don't suppose there's type checking on indexing via fields... IE df.at(field_value) typechecks no matter what type the first field of the record class is.

This wasn't implemented as I think it would be very hard to do/impossible in Python.
Post reply on HN