Skip to content

Commit 26de031

Browse files
authored
DOC: Add small userguide example on how to use arrow dtype backend in read_parquet (#52734)
1 parent 6c56c88 commit 26de031

File tree

1 file changed

+14
-0
lines changed

1 file changed

+14
-0
lines changed

doc/source/user_guide/io.rst

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5323,6 +5323,20 @@ Read from a parquet file.
53235323
53245324
result.dtypes
53255325
5326+
By setting the ``dtype_backend`` argument you can control the default dtypes used for the resulting DataFrame.
5327+
5328+
.. ipython:: python
5329+
:okwarning:
5330+
5331+
result = pd.read_parquet("example_pa.parquet", engine="pyarrow", dtype_backend="pyarrow")
5332+
5333+
result.dtypes
5334+
5335+
.. note::
5336+
5337+
Note that this is not supported for ``fastparquet``.
5338+
5339+
53265340
Read only certain columns of a parquet file.
53275341

53285342
.. ipython:: python

0 commit comments

Comments
 (0)