⌘K ctrl+k
Search Shortcut cmd + k | ctrl + k
DuckDB 2.0 ドキュメント 全文検索
per page, with , order by , clip by
Results of 1 - 4 of about 4 for pydict (0.001 sec.)
SQL on Apache Arrow 11483
DuckDB can query multiple different types of Apache Arrow objects. DuckDB pushes the filters of a query that it can translate, such as comparisons, into the scan of an Arrow dataset. Arrow tables, record batches, scanners and RecordBatchRea ... mport duckdb import pyarrow as pa # connect to an in-memory database con = duckdb.connect() my_arrow_table = pa.Table.from_pydict({'i': [1, 2, 3, 4], 'j': ["one", "two", "three", "four"]}) # query the Apache Arrow Table "my_arrow_table" and return as a ... s pq import pyarrow.dataset as ds # connect to an in-memory database con = duckdb.connect() my_arrow_table = pa.Table.from_pydict({'i': [1, 2, 3, 4], 'j': ["one", "two", "three", "four"]}) # create example Parquet files and save in a folder parquet_fol ... s ds import pyarrow.compute as pc # connect to an in-memory database con = duckdb.connect() my_arrow_table = pa.Table.from_pydict({'i': [1, 2, 3, 4], 'j': ["one", "two", "three", "four"]}) # create example Parquet files and save in a folder parquet_fol ...
https://man.mtool.work/duckdb/2.0/guides/python/sql_on_arrow.html
Export to Apache Arrow 10355
All results of a query can be exported to an Apache Arrow Table using the to_arrow_table function. Alternatively, results can be returned as a RecordBatchReader using the to_arrow_reader function and results can be read one batch at a time. ... kdb module no longer have them. Export to an Arrow Table import duckdb import pyarrow as pa my_arrow_table = pa.Table.from_pydict({'i': [1, 2, 3, 4], 'j': ["one", "two", "three", "four"]}) # query the Apache Arrow Table "my_arrow_table" and return as a ... ql("SELECT i FROM range(5) AS t(i)") with rel.to_arrow_reader(batch_size=2) as reader: for batch in reader: print(batch.to_pydict()) {'i': [0, 1]} {'i': [2, 3]} {'i': [4]} The small batch size makes the batches visible here. Omit it to use the default ... polars as pl import pyarrow as pa rel = duckdb.sql("SELECT i, 'v' || i AS s FROM range(3) AS t(i)") print(pa.table(rel).to_pydict()) print(pl.DataFrame(rel)) {'i': [0, 1, 2], 's': ['v0', 'v1', 'v2']} shape: (3, 2) ┌─────┬─────┐ │ i ┆ s │ │ --- ┆ --- │ ...
https://man.mtool.work/duckdb/2.0/guides/python/export_arrow.html
Import from Apache Arrow 8488
CREATE TABLE AS and INSERT INTO can be used to create a table from any query. We can then create tables or insert into existing tables by referring to the Apache Arrow object in the query. This example imports from an Arrow Table , but Duck ... in the SQL on Arrow guide . import duckdb import pyarrow as pa # connect to an in-memory database my_arrow = pa.Table.from_pydict({'a': [42]}) # create the table "my_table" from the DataFrame "my_arrow" duckdb.sql("CREATE TABLE my_table AS SELECT * FRO ...
https://man.mtool.work/duckdb/2.0/guides/python/import_arrow.html
Python API 6620
Installation To use the DuckDB Python client, visit the Python installation page . The latest stable version of the DuckDB Python client is 2.0.0. Installation The DuckDB Python API can be installed using pip : pip install duckdb . Please s ... │ └───────┘ PyArrow To directly query a PyArrow table, run: import duckdb import pyarrow as pa arrow_table = pa.Table.from_pydict({"a": [42]}) duckdb.sql("SELECT * FROM arrow_table") ┌───────┐ │ a │ │ int64 │ ├───────┤ │ 42 │ └───────┘ Result Conversio ...
https://man.mtool.work/duckdb/2.0/clients/python/overview.html
PREV 1 NEXT
DuckDB 2.0 Documentation / man.mtool.work