From a890df08163a34f0be410b66317fb5f51dc0d6e5 Mon Sep 17 00:00:00 2001 From: Vamsi Verma Date: Sat, 19 Nov 2022 21:14:31 +0000 Subject: [PATCH 1/3] update ODS docs --- doc/source/user_guide/io.rst | 22 ++++++++++++++-------- 1 file changed, 14 insertions(+), 8 deletions(-) diff --git a/doc/source/user_guide/io.rst b/doc/source/user_guide/io.rst index b4bf3ef024d4c..4af2ecfa9d705 100644 --- a/doc/source/user_guide/io.rst +++ b/doc/source/user_guide/io.rst @@ -3827,22 +3827,28 @@ format of an Excel worksheet created with the ``to_excel`` method. Excellent ex OpenDocument Spreadsheets ------------------------- -.. versionadded:: 0.25 - -The :func:`~pandas.read_excel` method can also read OpenDocument spreadsheets -using the ``odfpy`` module. The semantics and features for reading +The io methods for `Excel files`_ also support reading and writing OpenDocument spreadsheets +using the `odfpy `__ module. The semantics and features for reading and writing OpenDocument spreadsheets match what can be done for `Excel files`_ using ``engine='odf'``. +.. versionadded:: 0.25 + +The :func:`~pandas.read_excel` can read OpenDocument spreadsheets + .. code-block:: python # Returns a DataFrame - pd.read_excel("path_to_file.ods", engine="odf") + df = pd.read_excel("path_to_file.ods", engine="odf") -.. note:: +.. versionadded:: 1.1.0 - Currently pandas only supports *reading* OpenDocument spreadsheets. Writing - is not implemented. +Similarly, the :func:`~pandas.to_excel` can write OpenDocument spreadsheets + +.. code-block:: python + + # Writes DataFrame to a .ods file + df.to_excel("path_to_file.ods", engine="odf") .. _io.xlsb: From 6242169fda1ecc10a358ac68fb382e73786d924b Mon Sep 17 00:00:00 2001 From: Vamsi Verma Date: Sat, 19 Nov 2022 21:25:55 +0000 Subject: [PATCH 2/3] minor fix --- doc/source/user_guide/io.rst | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/doc/source/user_guide/io.rst b/doc/source/user_guide/io.rst index 4af2ecfa9d705..5d65c6fb77ed8 100644 --- a/doc/source/user_guide/io.rst +++ b/doc/source/user_guide/io.rst @@ -3834,7 +3834,7 @@ OpenDocument spreadsheets match what can be done for `Excel files`_ using .. versionadded:: 0.25 -The :func:`~pandas.read_excel` can read OpenDocument spreadsheets +The :func:`~pandas.read_excel` method can read OpenDocument spreadsheets .. code-block:: python @@ -3843,7 +3843,7 @@ The :func:`~pandas.read_excel` can read OpenDocument spreadsheets .. versionadded:: 1.1.0 -Similarly, the :func:`~pandas.to_excel` can write OpenDocument spreadsheets +Similarly, the :func:`~pandas.to_excel` method can write OpenDocument spreadsheets .. code-block:: python From 2f5a9e547915e4780855a7fee4ca721822f20e2c Mon Sep 17 00:00:00 2001 From: Vamsi Verma Date: Sat, 19 Nov 2022 21:32:08 +0000 Subject: [PATCH 3/3] fix again --- 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 5d65c6fb77ed8..53bcf6ffd7a8a 100644 --- a/doc/source/user_guide/io.rst +++ b/doc/source/user_guide/io.rst @@ -3839,7 +3839,7 @@ The :func:`~pandas.read_excel` method can read OpenDocument spreadsheets .. code-block:: python # Returns a DataFrame - df = pd.read_excel("path_to_file.ods", engine="odf") + pd.read_excel("path_to_file.ods", engine="odf") .. versionadded:: 1.1.0