1 points · by bradmerlin · 7y ago · 1 comment
Requiring series doesn't seem like the right thing either because sometimes a function might require a few columns whose rows are related.
Is there an accepted way to define these sort of functions that lets the caller to easily understand what columns (or even types) are required? Or am I missing something obvious and this isn't a real problem?
I can think of a few ways to do it (mostly thinking decorators) but it'd be awesome to hear what people are doing in the real world.
If you want to roll code, you could use decorators or overload pandas methods like joins to build a provenance graph.
If you don't want to roll code, you can treat the transform as a black box and define your inputs and outputs in terms of database/store tables.