Skip to content

Discussion regarding custom row-like outputs in combine and transform #2576

@pdeffebach

Description

@pdeffebach

I'm currently working on a small implementation of a Tables.AbstractRow. It's basically a wrapper around an OrderedDict which is a Tables.AbstractRow and defines all the convenience methods of a DataFrameRow, like indexing with Not.

The goal is to make it easier to work with complicated combine calls where to iteratively build up your output. This is actually quite difficult and I think there are a few inconsistencies in the API

  1. transform works fine with ByRow. ByRow returns a vector of Tables.AbstractRow objects, which is itself a Table
  2. With combine using the src => fun => AsTable output, I can collapse to get single rows when I define Tables.columntable for my DataRow type. However this trick doesn't work when using an anonymous function. With the anonymous function, the output really has to be a matrix, named tuple, or data frame.

This might be an inconsistency in the API.

Regardless, I will move forward with the development of my package and call NamedTuple at the very end of my combine call to get the desired behavior.

Metadata

Metadata

Assignees

No one assigned

    Labels

    breakingThe proposed change is breaking.featurenon-breakingThe proposed change is not breaking

    Type

    No type

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions