Skip to content

DOC: Added note and example for pyarrow storage #53961

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
wants to merge 7 commits into from
Closed
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
19 changes: 19 additions & 0 deletions doc/source/user_guide/io.rst
Original file line number Diff line number Diff line change
Expand Up @@ -5464,6 +5464,25 @@ The above example creates a partitioned dataset that may look like:
except OSError:
pass

.. note::

* The parquet representation of ``StringDtype`` is the same, regardless of the storage.
* The data will be read in accordance with the ``string_storage`` settings.

.. ipython:: python

df1 = pd.DataFrame({"A": pd.array(['a', 'b'], dtype=pd.StringDtype("pyarrow"))})
df2 = pd.DataFrame({"A": pd.array(['a', 'b'], dtype=pd.StringDtype("python"))})
df1.to_parquet("test.parquet")
with pd.option_context("string_storage", "pyarrow"):
df3 = pd.read_parquet("test.parquet")
pd.testing.assert_frame_equal(df3, df1)
df2.to_parquet("test.parquet")
with pd.option_context("string_storage", "pyarrow"):
df4 = pd.read_parquet("test.parquet")
pd.testing.assert_frame_equal(df4, df1)


.. _io.orc:

ORC
Expand Down
5 changes: 5 additions & 0 deletions doc/source/user_guide/text.rst
Original file line number Diff line number Diff line change
Expand Up @@ -81,6 +81,11 @@ or convert from existing pandas data:
s2
type(s2[0])

.. note::

* The parquet representation of ``StringDtype`` is the same, regardless of the storage.
* The data will be read in accordance with the ``string_storage`` settings.


.. _text.differences:

Expand Down