diff --git a/docs/_build/API_REFERENCE_LINKS.yml b/docs/_build/API_REFERENCE_LINKS.yml index a0c31f1cc8e3..553e1275c42e 100644 --- a/docs/_build/API_REFERENCE_LINKS.yml +++ b/docs/_build/API_REFERENCE_LINKS.yml @@ -13,6 +13,7 @@ python: read_json: https://pola-rs.github.io/polars/py-polars/html/reference/api/polars.read_json.html write_json: https://pola-rs.github.io/polars/py-polars/html/reference/api/polars.DataFrame.write_json.html read_ipc: https://pola-rs.github.io/polars/py-polars/html/reference/api/polars.read_ipc.html + read_parquet: https://pola-rs.github.io/polars/py-polars/html/reference/api/polars.read_parquet.html min: https://pola-rs.github.io/polars/py-polars/html/reference/series/api/polars.Series.min.html max: https://pola-rs.github.io/polars/py-polars/html/reference/series/api/polars.Series.max.html value_counts: https://pola-rs.github.io/polars/py-polars/html/reference/expressions/api/polars.Expr.value_counts.html diff --git a/docs/src/python/user-guide/io/cloud-storage.py b/docs/src/python/user-guide/io/cloud-storage.py index 0f968e15f97b..0a01ae101ba6 100644 --- a/docs/src/python/user-guide/io/cloud-storage.py +++ b/docs/src/python/user-guide/io/cloud-storage.py @@ -1,3 +1,8 @@ +# --8<-- [start:setup] +import polars as pl + +# --8<-- [end:setup] + """ # --8<-- [start:read_parquet] import polars as pl diff --git a/docs/user-guide/io/cloud-storage.md b/docs/user-guide/io/cloud-storage.md index 69e01750c6f2..863f32097e3e 100644 --- a/docs/user-guide/io/cloud-storage.md +++ b/docs/user-guide/io/cloud-storage.md @@ -3,6 +3,7 @@ Polars can read and write to AWS S3, Azure Blob Storage and Google Cloud Storage. The API is the same for all three storage providers. To read from cloud storage, additional dependencies may be needed depending on the use case and cloud storage provider: + === ":fontawesome-brands-python: Python" ```shell diff --git a/docs/user-guide/io/csv.md b/docs/user-guide/io/csv.md index dc3304b91d12..b653f36823ac 100644 --- a/docs/user-guide/io/csv.md +++ b/docs/user-guide/io/csv.md @@ -1,11 +1,13 @@ # CSV -## Read & write +## Read Reading a CSV file should look familiar: -{{code_block('user-guide/io/csv','read',['read_csv'])}} +{{code_block +('user-guide/io/csv','read',['read_csv'])}} +## Write Writing a CSV file is similar with the `write_csv` function: {{code_block('user-guide/io/csv','write',['write_csv'])}} diff --git a/docs/user-guide/io/database.md b/docs/user-guide/io/database.md index a9922d8fcf76..ea1c9167fcc9 100644 --- a/docs/user-guide/io/database.md +++ b/docs/user-guide/io/database.md @@ -38,7 +38,7 @@ $ pip install connectorx #### ADBC -ADBC (Arrow Database Connectivity) is a new engine supported by the Apache Arrow project. +ADBC (Arrow Database Connectivity) is an engine supported by the Apache Arrow project. ADBC aims to be both an API standard for connecting to databases and libraries implementing this standard in a range of languages. It is still early days for ADBC so support for different databases is still limited. At present drivers for ADBC are only available for [Postgres and SQLite](https://arrow.apache.org/adbc/0.1.0/driver/cpp/index.html). To install ADBC you need to install the driver for your database. For example to install the driver for SQLite you run diff --git a/docs/user-guide/io/json_file.md b/docs/user-guide/io/json_file.md index 0f4e4fae6195..530fa176b3e3 100644 --- a/docs/user-guide/io/json_file.md +++ b/docs/user-guide/io/json_file.md @@ -22,7 +22,7 @@ Polars can read an ND-JSON file into a `DataFrame` using the `read_ndjson` funct {{code_block('user-guide/io/json-file','write',['write_json','write_ndjson'])}} -## Scan NDJSON +## Scan `Polars` allows you to _scan_ a JSON input **only for newline delimited json**. Scanning delays the actual parsing of the file and instead returns a lazy computation holder called a `LazyFrame`. diff --git a/docs/user-guide/io/parquet.md b/docs/user-guide/io/parquet.md index ac071f507d56..886fb73bcb99 100644 --- a/docs/user-guide/io/parquet.md +++ b/docs/user-guide/io/parquet.md @@ -15,7 +15,6 @@ For reading a Parquet file from a cloud storage provider, see [Cloud storage](cl {{code_block('user-guide/io/parquet','write',['write_parquet'])}} -For writing a Parquet file to a cloud storage provider, see [Cloud storage](cloud-storage.md/#writing-to-cloud-storage). ## Scan diff --git a/py-polars/polars/config.py b/py-polars/polars/config.py index e41da17c695d..b4a17a35aac9 100644 --- a/py-polars/polars/config.py +++ b/py-polars/polars/config.py @@ -409,21 +409,15 @@ def set_auto_structify(cls, active: bool | None = False) -> type[Config]: ... out = df.select(pl.all()) ... >>> out - shape: (10, 1) + shape: (3, 1) ┌───────────┐ │ v │ │ --- │ │ struct[2] │ ╞═══════════╡ - │ {0,10} │ - │ {1,11} │ - │ {2,12} │ - │ {3,13} │ - │ … │ - │ {6,16} │ - │ {7,17} │ - │ {8,18} │ - │ {9,19} │ + │ {1,4} │ + │ {2,5} │ + │ {3,6} │ └───────────┘ """