From 56d63add4345fe5c840e0990a32dff9d5b08f808 Mon Sep 17 00:00:00 2001 From: Yasin Tatar Date: Tue, 18 Apr 2023 16:05:19 +0200 Subject: [PATCH 1/2] add: small userguide example on how to use arrow dtype backend --- doc/source/user_guide/io.rst | 14 ++++++++++++++ 1 file changed, 14 insertions(+) diff --git a/doc/source/user_guide/io.rst b/doc/source/user_guide/io.rst index c34d5f3c467a2..d24f5a830210d 100644 --- a/doc/source/user_guide/io.rst +++ b/doc/source/user_guide/io.rst @@ -5323,6 +5323,20 @@ Read from a parquet file. result.dtypes +By setting the ``dtype_backend`` argument you can control the default dtypes used for the resulting DataFrame. + +.. ipython:: python + :okwarning: + + result = pd.read_parquet("example_pa.parquet", engine="pyarrow", dtype_backend="pyarrow") + + result.dtypes + +.. note:: + + Note that this is not support for ``fastparquet``. + + Read only certain columns of a parquet file. .. ipython:: python From 2d271e8c2746b737d0e6df0793f76e967f541a77 Mon Sep 17 00:00:00 2001 From: Patrick Hoefler <61934744+phofl@users.noreply.github.com> Date: Wed, 19 Apr 2023 23:35:13 +0200 Subject: [PATCH 2/2] Update io.rst --- doc/source/user_guide/io.rst | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/doc/source/user_guide/io.rst b/doc/source/user_guide/io.rst index d24f5a830210d..103756158d2cf 100644 --- a/doc/source/user_guide/io.rst +++ b/doc/source/user_guide/io.rst @@ -5334,7 +5334,7 @@ By setting the ``dtype_backend`` argument you can control the default dtypes use .. note:: - Note that this is not support for ``fastparquet``. + Note that this is not supported for ``fastparquet``. Read only certain columns of a parquet file.