Skip to content

feat(csv): column statistics popover (counts, distinct, numeric summary, top values) #1470

Closed

Description

@salmonumbrella

Problem

Inspecting a CSV column today means scrolling the data, eyeballing values, and maybe running Copy Column Values into a shell to count things. A native column-level profile would close the biggest "why bounce to Modern CSV" gap — their Column Analysis and Unique Values popovers are the single most-cited reason CSV users keep that app around alongside a database client.

#1454's per-column local filter already needs distinct-value enumeration internally; the same primitive can drive a profile popover.

Proposed solution

Right-click a column header → Column Statistics… opens a popover showing, for the currently loaded rows:

  • Counts — total, non-empty, empty
  • Distinct value count
  • Detected type — string, int, float, date, mixed
  • Numeric summary — min, max, mean, median, sum, when the type is numeric
  • Top-N frequent values — value, count, percentage, inline frequency bar

The popover should:

Implementation notes

  • The DuckDB plugin can back this with SELECT … FROM read_csv_auto(…) GROUP BY column queries when available; pure-Swift counters work for the in-memory path.
  • feat(datagrid): per-column local value filter (Excel-style) #1454's distinct-value list is the same primitive at a different surface; consider sharing the implementation.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions