Mean Aggregate Per Numeric Column

Compute exact means for explicit dot-decimal CSV columns as reduced numerator/denominator strings, ignoring blanks; count zero and hasValues false identify absent means.

Description

A column mean divides the sum of observed numeric cells by their count.

A column mean divides the sum of observed numeric cells by their count. Exact decimal input can be represented as a rational number, preserving results such as one-third without binary floating-point rounding.1

The tool returns columns. Header and blank-cell settings determine which cells contribute to each selected mean.

When to use Mean Aggregate Per Numeric Column

Use this for the following task: Compute exact means for explicit dot-decimal CSV columns as reduced numerator/denominator strings, ignoring blanks; count zero and hasValues false identify absent means. Choose the intended columns and prepare the file’s delimiter and header settings.

How to use Mean Aggregate Per Numeric Column and understand its results

  1. Paste the CSV text and choose its delimiter, header setting and zero-based numeric column indexes.
  2. Enter csv, delimiter, hasHeader, columnIndices according to the field table, then run the tool.
  3. Read columns. Use the calculation below to interpret the selected mean or the model’s signs, units and comparison flags.
  4. Review the supplied assumptions and calibration before comparing or reporting the result.
Input fieldMeaningValue type and boundsRequirement
csvCSV textstring; maximum text length 100000Required
delimiterDelimiterstring; choices ",", ";", "\t"Required
hasHeaderHas headerbooleanRequired
columnIndicesColumn indiceslist of integer; minimum entries 0; maximum entries 10000; each entry: minimum 0Required

Choose comma, semicolon or tab, indicate whether the first record is a header, and supply unique zero-based column indexes. Parse quoted CSV records, require equal row widths, ignore blank numeric cells and reduce each mean with BigInt gcd.

mean = exact decimal sum/nonblank count, reduced to numerator/denominator

The symbols and boundary conditions refer to the supplied fields and the implementation described above.

Output fieldMeaningValue type
columnsColumnslist of object
json
{
  "input": {
    "csv": "value\n1\n0\n0",
    "delimiter": ",",
    "hasHeader": true,
    "columnIndices": [
      0
    ]
  },
  "output": {
    "columns": [
      {
        "column": 0,
        "count": 3,
        "hasValues": true,
        "numerator": "1",
        "denominator": "3"
      }
    ]
  }
}

Limitations and assumptions

Columns are explicitly selected rather than inferred. A column without numbers has hasValues=false, count=0 and placeholder 0/1; this is not an observed zero mean. Nondecimal numeric text and malformed CSV are errors. Numeric tokens may have an optional sign and surrounding whitespace, but need digits before any decimal point; exponent notation, grouping, a trailing decimal point and tokens longer than 200 characters are rejected.

The selected columns must actually use the supported decimal format. Input errors are separate from defined outputs for columns with no contributing numbers.

Alternative or Complementary methods

Choose Sum Aggregate Per Numeric Column when you need its operation: Sum explicit CSV numeric columns with exact decimal arithmetic, ignoring blank cells and rejecting other nonnumeric values; report observation counts and preserve an explicit header interpretation. Choose Non-Empty Count Per Column for the complementary operation: Count data cells that are not exactly empty per CSV column, excluding an explicit header; whitespace-only strings count as present.

Background reference: Common Format and MIME Type for Comma-Separated Values (CSV) Files.

References

  1. Common Format and MIME Type for Comma-Separated Values (CSV) Files — Internet Engineering Task Force, RFC 4180

Similar or alternative tools

  • Sum Aggregate Per Numeric Column

    Sum explicit CSV numeric columns with exact decimal arithmetic, ignoring blank cells and rejecting other nonnumeric values; report observation counts and preserve an explicit header interpretation.

  • Non-Empty Count Per Column

    Count data cells that are not exactly empty per CSV column, excluding an explicit header; whitespace-only strings count as present.

Don't forget to set a bookmark for tool.io!
Privacy | Imprint | Cookies