Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions .github/workflows/build.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -121,6 +121,7 @@ jobs:
rust/perspective-js/dist/ts-rs/
rust/perspective-viewer/src/ts/
rust/perspective-viewer/dist/ts-rs/
rust/target/json_schema/
rust/perspective-python/LICENSE_THIRDPARTY_cargo.yml

# ,-,---. . . ,-_/ .---. .
Expand Down
65 changes: 65 additions & 0 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

3 changes: 2 additions & 1 deletion docs/md/FAQ.md
Original file line number Diff line number Diff line change
Expand Up @@ -509,7 +509,8 @@ Perspective accepts (see [Loading data](./explanation/table/loading_data.md)):
- **JavaScript**: JSON (row-oriented or column-oriented objects), NDJSON, CSV
strings, Apache Arrow `ArrayBuffer`
- **Python**: `dict`, `list`, `pandas.DataFrame`, `polars.DataFrame`,
`pyarrow.Table`, NDJSON, CSV strings, Apache Arrow bytes
`pyarrow.Table`, `pyarrow.RecordBatch`, NDJSON, CSV strings, Apache Arrow
bytes

<!-- _Related: [#929](https://github.com/perspective-dev/perspective/issues/929),
[#2524](https://github.com/perspective-dev/perspective/issues/2524)_ -->
Expand Down
10 changes: 5 additions & 5 deletions docs/md/explanation/table/loading_data.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,11 +3,11 @@
A `Table` may also be created-or-updated by data in CSV,
[Apache Arrow](https://arrow.apache.org/), JSON row-oriented or JSON
column-oriented formats. In addition to these, `perspective-python` additionally
supports `pyarrow.Table`, `polars.DataFrame` and `pandas.DataFrame` objects
directly. These formats are otherwise identical to the built-in formats and
don't exhibit any additional support or type-awareness; e.g., `pandas.DataFrame`
support is _just_ `pyarrow.Table.from_pandas` piped into Perspective's Arrow
reader.
supports `pyarrow.Table`, `pyarrow.RecordBatch`, `polars.DataFrame` and
`pandas.DataFrame` objects directly. These formats are otherwise identical to
the built-in formats and don't exhibit any additional support or type-awareness;
e.g., `pandas.DataFrame` support is _just_ `pyarrow.Table.from_pandas` piped
into Perspective's Arrow reader.

`Client::table` and `Table::update` perform _coercion_ on their input for all
input formats _except_ Arrow (which comes with its own schema and has no need
Expand Down
1 change: 1 addition & 0 deletions docs/md/how_to/python/table.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@ commonly used when processing data:

- `pandas.DataFrame`
- `polars.DataFrame`
- `pyarrow.Table` and `pyarrow.RecordBatch`
- `bytes` (encoding an Apache Arrow)
- `objects` (either extracting a repr or via reference)
- `str` (encoding as a CSV)
Expand Down
7 changes: 7 additions & 0 deletions docs/md/how_to/python/table_data.md
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,13 @@ The same applies to `Table.update()`:
table.update(arrow_table)
```

A `pyarrow.RecordBatch` is accepted anywhere a `pyarrow.Table` is:

```python
batch = pa.RecordBatch.from_pydict({"int": [4, 5], "float": [4.5, 5.5], "string": ["d", "e"]})
table.update(batch)
```

If you have Arrow data already in IPC format (e.g. read from disk, received
over the wire, or produced by another tool), pass the raw `bytes` directly —
both stream and file formats are auto-detected:
Expand Down
68 changes: 6 additions & 62 deletions pnpm-lock.yaml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 1 addition & 0 deletions pnpm-workspace.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -83,6 +83,7 @@ catalog:
"@types/ws": ">=8"
"@types/chroma-js": "^3.1.2"
"@zip.js/zip.js": "^2.7.54"
"ajv": "^8.2"
"apache-arrow": "17.0.0"
"arraybuffer-loader": ">=1.0.8 <2"
"auto-changelog": "^2.5.0"
Expand Down
7 changes: 7 additions & 0 deletions rust/metadata/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,13 @@ artifact = ["bin"]
version = "11.0.1"
features = ["serde-json-impl", "no-serde-warnings"]

[dependencies.schemars]
version = "1.2.3"
features = ["preserve_order"]

[dependencies.serde_json]
version = "1.0.107"

[dependencies.perspective-server]
path = "../perspective-server"
features = ["external-cpp", "disable-cpp"]
Expand Down
Loading
Loading