Description
Construct exact-count repeated categorical groups with seeded integer/missing values, serialize to CSV and delegate count/sum/mean/min/max pivot answers; count includes missing-value rows, other aggregates omit missing values and return zero for all-missing groups, with the core's floating arithmetic and sorted group keys—not a missing cross-tab fill rule.
CSV stores records as delimited text fields. Quoting can protect embedded delimiters and newlines, so a record need not equal one physical line. Cleaning field contents, interpreting their types, and preserving an exact import/export round trip are separate operations.
Construct exact-count repeated categorical groups with seeded integer/missing values, serialize to CSV and delegate count/sum/mean/min/max pivot answers; count includes missing-value rows, other aggregates omit missing values and return zero for all-missing groups, with the core's floating arithmetic and sorted group keys—not a missing cross-tab fill rule.
When to use this tool
Use this generator to create reproducible csv pivot practice dataset cases from the supplied model or bank. Inspect the returned evidence before using cases in a test or exercise.
How to use the tool and how it works
- Supply categories, distinctGroupCount, rowCount, minimumValue, maximumValue, missingProbability, aggregation, delimiter in the field shapes below. Set seed when you need an explicit replay.
- Run the tool and correct any input error. For generated controls, distinguish a successful fixture containing an invalid case from failure to generate the fixture.
- Read groupColumns, selectedGroups, rows, csv, aggregation, table, missingValueCount. Use the conventions below. Keep answer-bearing fields separate when presenting an exercise.
Sample distinct grouping combinations from the Cartesian category space, guarantee each appears, and fill remaining rows from them. Draw integer or missing values, serialize CSV, and delegate the chosen aggregation pivot with explicit grouping columns.1
Delegated operations used for this result: pivot; json to csv. Their calculation or parsing conventions apply to the corresponding result fields.2, 3
| Input field | Meaning and units | Accepted input |
|---|---|---|
| categories | Categories | Required. Array of Array of Text; maximum UTF-16 length 64.; minimum items 1; maximum items 16.; minimum items 1; maximum items 3. |
| distinctGroupCount | Distinct Group Count | Required. Safe integer; minimum 1; maximum 32. |
| rowCount | Row Count | Required. Safe integer; minimum 1; maximum 256. |
| minimumValue | Minimum Value | Required. Safe integer. |
| maximumValue | Maximum Value | Required. Safe integer. |
| missingProbability | Missing Probability | Required. Finite number; minimum 0; maximum 1. |
| aggregation | Aggregation | Required. Text; one of "count", "sum", "mean", "min", "max". |
| delimiter | Delimiter | Required. Text; one of ",", ";", "\t", "|". |
| seed | Optional numeric seed; takes precedence over context randomness. Without either, use the fixed tool.io default seed. | Optional. Safe integer. |
| Output field | Interpretation | Returned shape |
|---|---|---|
| groupColumns | Group Columns | Required. Array of Text; minimum UTF-16 length 2; maximum UTF-16 length 2.; minimum items 1; maximum items 3. |
| selectedGroups | Selected Groups | Required. Array of Array of Text; maximum UTF-16 length 64.; minimum items 1; maximum items 3.; minimum items 1; maximum items 32. |
| rows | Rows | Required. Array of Object; no unknown keys.; minimum items 1; maximum items 256. |
| rows[].group | Group | Required. Array of Text; maximum UTF-16 length 64.; minimum items 1; maximum items 3. |
| rows[].value | Value | Required. Safe integer. or Null. |
| csv | Csv | Required. Text; minimum UTF-16 length 1; maximum UTF-16 length 131072. |
| aggregation | Aggregation | Required. Text; one of "count", "sum", "mean", "min", "max". |
| table | Table | Required. Object; no unknown keys. |
| table.columns | Columns | Required. Array of Text; minimum UTF-16 length 1; maximum UTF-16 length 16.; minimum items 2; maximum items 4. |
| table.rows | Rows | Required. Array of Array of Text; maximum UTF-16 length 64. or Finite number.; minimum items 2; maximum items 4.; minimum items 1; maximum items 32. |
| missingValueCount | Missing Value Count | Required. Safe integer; minimum 0; maximum 256. |
| randomness | Replay source and normalized 32-bit seed, or null seed for an advancing context source. | Required. Object; no unknown keys. |
| randomness.seed | Optional safe-integer replay seed; normalization and precedence are explained below. | Required. Safe integer. or Null. |
| randomness.source | Source | Required. Text; one of "context", "seed". |
An explicit safe-integer seed takes precedence over injected context randomness and is normalized to an unsigned 32-bit integer. With no seed and no context source, replay uses the fixed tool.io default seed. A context source must return finite values from zero inclusive to one exclusive; its advancing state must be retained separately. randomness records the source and normalized seed, or null for context. These generators are not cryptographic random sources.
{
"input": {
"categories": [
[
"east",
"west"
]
],
"distinctGroupCount": 2,
"rowCount": 4,
"minimumValue": 1,
"maximumValue": 5,
"missingProbability": 0.5,
"aggregation": "sum",
"delimiter": ",",
"seed": 42
},
"output": {
"groupColumns": [
"g0"
],
"selectedGroups": [
[
"west"
],
[
"east"
]
],
"rows": [
{
"group": [
"east"
],
"value": 5
},
{
"group": [
"east"
],
"value": null
},
{
"group": [
"east"
],
"value": null
},
{
"group": [
"west"
],
"value": 4
}
],
"csv": "g0,value\neast,5\neast,\neast,\nwest,4\n",
"aggregation": "sum",
"table": {
"columns": [
"g0",
"value_sum"
],
"rows": [
[
"east",
5
],
[
"west",
4
]
]
},
"missingValueCount": 2,
"randomness": {
"seed": 42,
"source": "seed"
}
}
} Limitations and assumptions
- Missing values and aggregation interpretation follow the linked pivot tool. Group count cannot exceed either the category population or rowCount. This is practice data rather than a conclusion about real groups.
- A replay requires the same complete input and implementation. The stated sampling convention applies within its eligible space. A finite draw does not exhaust all possible outputs; repeats remain possible unless a distinct-selection rule is explicit.
- The field tables state structural bounds; cross-field constraints and bounded search or output budgets also apply. Unknown keys are rejected where the object contract disallows them. Input errors are distinct from null fields and deliberate invalid controls in a successful output.
Alternative or Complementary methods
For a supplied example, inspect the returned construction or delegated check directly. To evaluate a consumer, also test cases chosen for its own boundaries; a generated finite corpus does not establish exhaustive coverage.
References
Similar or alternative tools
- Random CSV Filter Expression Practice Generator
Generate synthetic category and integer rows for supplied equality or exact-decimal greater-than predicates, retaining per-row pass labels and delegated CSV filter answers without evaluating expressions.
- Random CSV Long and Wide Round-Trip Fixture Generator
Construct a complete entity/measure grid with planted duplicate observations, explicitly sum duplicates, reshape to fixed-header wide CSV and unpivot the aggregate answer using reviewed CSV converters.