Skip to content

Incorrect column names when using computing aggregates #229

Closed
@holgerbrandl

Description

@holgerbrandl

Consider the following example

 val aggregate = irisData.groupBy("Species")
          .aggregate {
              mean() into "mean"
              std() into "sd"
          }

aggregate.flatten().print()

The result is

      Species Sepal.Length Sepal.Width Petal.Length Petal.Width Sepal.Length1 Sepal.Width1 Petal.Length1 Petal.Width1
 0     setosa     5.006000    3.428000     1.462000    0.246000      0.352490     0.379064      0.173664     0.105386
 1 versicolor     5.936000    2.770000     4.260000    1.326000      0.516171     0.313798      0.469911     0.197753
 2  virginica     6.588000    2.974000     5.552000    2.026000      0.635880     0.322497      0.551895     0.274650

      Species Sepal.Length Sepal.Width Petal.Length Petal.Width
 0     setosa     5.006000    3.428000     1.462000    0.246000
 1 versicolor     5.936000    2.770000     4.260000    1.326000
 2  virginica     6.588000    2.974000     5.552000    2.026000

Observed: column names are not indicating the type of aggregate

Expected: Sepal.Length.mean, Sepal.Length.sd, and so on on

Metadata

Metadata

Assignees

Labels

enhancementNew feature or request

Type

No type

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions