[Autoloop: build-tsb-pandas-typescript-migration]#323
Draft
github-actions[bot] wants to merge 6 commits into
Draft
[Autoloop: build-tsb-pandas-typescript-migration]#323github-actions[bot] wants to merge 6 commits into
github-actions[bot] wants to merge 6 commits into
Conversation
…readXml() and toXml() — pd.read_xml() / DataFrame.to_xml() port Zero-dep XML tokenizer supporting attributes, child elements, CDATA, entities, namespace prefix stripping, naValues, usecols, nrows, indexCol. toXml: rootName, rowName, attribs, xmlDeclaration, namespaces, indent, cdataCols. Entity encoding/decoding, full round-trip support. 50+ tests + property tests. Playground page with 9 interactive examples. Run: https://github.com/githubnext/tsb/actions/runs/25970646245 Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
…readTable() — pd.read_table() port Add `readTable()` function that mirrors `pandas.read_table()`: - Thin wrapper around `readCsv` defaulting sep to '\t' (tab) - Distinct from readCsv (different default separator) - Full ReadCsvOptions forwarding: indexCol, nRows, skipRows, dtype, naValues - 40+ unit tests covering all options, edge cases, and property-based round-trips - Interactive playground page with 9 examples Run: https://github.com/githubnext/tsb/actions/runs/25992061510 Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Contributor
Author
…caseWhen() — pd.Series.case_when() port Implements pandas.Series.case_when(caselist) (pandas 2.2+) as a standalone caseWhen() function. Applies an ordered list of (condition, replacement) pairs — first matching condition wins, unmatched rows keep original value. - src/stats/case_when.ts: full implementation with ResolvedBranch pre-extraction - Conditions: boolean Series, boolean array, or predicate (value, idx) => boolean - Replacements: scalar, Series, or array - 316 lines of tests (unit + property-based with fast-check) - 9-example playground page - Exported from src/stats/index.ts and src/index.ts Run: https://github.com/githubnext/tsb/actions/runs/26021661493 Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Contributor
Author
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Iteration 316: Add
readXml()andtoXml()— port ofpandas.read_xml()/DataFrame.to_xml().What's new
src/io/xml.ts— zero-dependency XML I/O module:readXml(text, options?): parses XML into a DataFramens:col→col)&,<,A,A, ...)rowTag,indexCol,usecols,naValues,converters,nrows,attribs,elemstoXml(df, options?): serializes DataFrame to well-formed XMLattribs: true)rootName,rowName,attribs,xmlDeclaration,namespaces,indent,cdataColstests/io/xml.test.ts— 50+ tests: unit, property-based (fast-check), round-tripplayground/xml.html— 9 interactive playground examplesUpdated
src/io/index.ts,src/index.ts,playground/index.htmlMetric
pandas_features_ported: 148 → 149 (+1)Program
Related to issue #1.
🤖 This PR is maintained by Autoloop. Each accepted iteration adds a commit to this branch.