Skip to content

Aggregated values don't refresh on data change #3003

@gverger

Description

@gverger

Small description

When adding an aggregated value to a column, like sum or mean, it doesn't refresh when the sheet is modified:

  • the type of the column changes
  • a line is added.

Data to reproduce

# aggregates.csv
A,B
12,33.34
54,12.40

[Please include a small amount of sample data that demonstrates the issue.]

Steps to reproduce

Problems with type

Type + then sum and enter to add a sum aggregation under column A

 A                  │ B     ║
 12                 │ 33.34 ║
 54                 │ 12.40 ║
 sum() can't sum st…          sum

The sum cannot be computed, this is ok: there is no defined type for A.

Type # to update the type of the column

 A                 #│ B     ║
                 12 │ 33.34 ║
                 54 │ 12.40 ║
 sum() can't sum st…          sum

I think that here, the sum should be computed correctly.

Problem with new line

update the type of column b to float: type % when hovering column B
add the sum to column B: type + and then sum ENTER

 A                 #│ B    %║
                 12 │ 33.34 ║
                 54 │ 12.40 ║
 sum() can't sum st…  45.74   sum

The sum of elements in column B is computed

Delete a row: go on any row and type D.

 A                 #│ B    %║
                 12 │ 33.34 ║
 sum() can't sum st…  45.74   sum

The row is deleted but the sum doesn't update

The worst here is that I can delete the sum aggregate from the column and add it again, but the old value still remains. Creating a new sheet from all line will display the right sum.

Configuration

Issue in v3.3.0 and latest git version v3.4dev

Additional context

  • What platform and version are you using (Linux, MacOS, Windows)?
    Linux (WSL)

  • Which version of Python?
    Python 3.11.1

Metadata

Metadata

Assignees

No one assigned

    Labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions