dataclassframe

Languages and libraries

python library

SHOW HN2020

dataclassframe

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

github.com

#python dataclass#pandas#dataframe#multi-indexing#vectorised operations

122points
14comments
#526of 3,028 in 2020
Top 18%of 2020 by points

How HN took it

DebatedReal support and real criticism

4 positive, 3 neutral or asking, 0 mixed, 3 critical, out of 10 comments about the project. Thread score +0.04.

Idea: 3 for, 2 againstDesign: 1 for, 0 againstDocs: 0 for, 1 against

The thread, comment by comment

Each row is a top-level comment and its replies, in HN's order. Select a cell to open that comment on HN.

positive neutral or mixed critical about another commenter or something else the maker

What HN said

What people liked

  • Combines dataclass typing with Pandas-style bulk operations

    From 3 comments
    • This is what this package aims to prevent. Providing rigidity to the data structure while giving the performance and API benefits of Pandas
      joshlk on HN
    • Excellent, I've been adding lots of dataclasses to a project that has some pandas parts. Love the additional productivity from pyright type checking and found the type ambiguity…
      jackric on HN
    • This is nice! 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…
      hankdoupe on HN
  • Useful for typed data work with pyright

    From 1 comment
    • Excellent, I've been adding lots of dataclasses to a project that has some pandas parts. Love the additional productivity from pyright type checking and found the type ambiguity…
      jackric on HN

Objections

  • Dataframes are too mutable and lead to kitchen-sink APIs

    From 1 comment
    • I don't generally think that dataframes as a data interchange format are a good idea if you're looking to build long-term maintainable code. Their structure is too mutable – in…
      mplewis on HN
  • Title backslash and 'opps' abbreviation are confusing

    From 1 comment
    • Meta: that's a very random backslash in the title, very confusing in my opinion. It's just an abbreviated "with" so should be a forward slash ("w/") or, better imo, written out…
      unwind on HN

Requests

  • Type checking for indexing by field values

    From 1 comment
    • 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.
      adornedCupcake on HN
  • Support for nested structs

    From 1 comment
    • Looks interesting; thanks for writing this! Does it support nested structs? Sometimes that's more natural than a flat struct.
      jvz on HN

Questions

  • Does it support nested dataclasses?

    From 2 comments
    • Looks interesting; thanks for writing this! Does it support nested structs? Sometimes that's more natural than a flat struct.
      jvz on HN
    • Yes - you can use nested dataclasses. But you will loose some of the nice features
      joshlk on HN

Alternatives named

  • Apache Arrow

    From 2 comments
    • This appears to be encroaching on Apache Arrow's territory (which notably is headed by the creator of Pandas): https://arrow.apache.org/
      minimaxir on HN
    • 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…
      igor47 on HN
  • MLflow

    From 1 comment
    • One of the reasons this is interesting to me is that we quickly hit one of MLflow's limitations[0] in our machine learning platform[1]. Users collaborate in near real-time on…
      Jugurtha on HN
  • Pandas

    From 1 comment
    • This is nice! 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…
      hankdoupe on HN
  • sortedcontainers

    From 1 comment
    • This is nice! 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…
      hankdoupe on HN

Category, keywords, summaries and labels on this page were made by AI (Thread Reader v2) and not checked by hand. Each point links to the comments it came from.

Add a badge to your READMEShown on HackerShow
[![Shown on HackerShow](https://hackershow.org/badge.svg)](https://hackershow.org/show/24970653)