Skip to content

Commit fc65c52

Browse files
CLN/DEPR: remove deprecated pandas.rpy module (GH9602)
1 parent 0e219d7 commit fc65c52

File tree

12 files changed

+11
-654
lines changed

12 files changed

+11
-654
lines changed

ci/lint.sh

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,10 +8,9 @@ RET=0
88

99
if [ "$LINT" ]; then
1010

11-
# pandas/rpy is deprecated and will be removed.
1211
# pandas/src is C code, so no need to search there.
1312
echo "Linting *.py"
14-
flake8 pandas --filename=*.py --exclude pandas/rpy,pandas/src
13+
flake8 pandas --filename=*.py --exclude pandas/src
1514
if [ $? -ne "0" ]; then
1615
RET=1
1716
fi

doc/source/r_interface.rst

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -15,11 +15,11 @@ rpy2 / R interface
1515

1616
.. warning::
1717

18-
In v0.16.0, the ``pandas.rpy`` interface has been **deprecated and will be
19-
removed in a future version**. Similar functionality can be accessed
20-
through the `rpy2 <https://rpy2.readthedocs.io/>`__ project.
21-
See the :ref:`updating <rpy.updating>` section for a guide to port your
22-
code from the ``pandas.rpy`` to ``rpy2`` functions.
18+
Up to pandas 0.19, a ``pandas.rpy`` module existed with functionality to
19+
convert between pandas and ``rp2`` objects. This functionality now lives in
20+
the `rpy2 <https://rpy2.readthedocs.io/>`__ project itself.
21+
See the :ref:`updating <rpy.updating>` section below for a guide to port
22+
your code from the removed ``pandas.rpy`` to ``rpy2`` functions.
2323

2424

2525
.. _rpy.updating:
@@ -60,7 +60,7 @@ can be replaced with::
6060

6161
from rpy2.robjects import r
6262
r.data('iris')
63-
df_iris = pandas2ri.ri2py(r[name])
63+
df_iris = pandas2ri.ri2py(r['iris'])
6464

6565
The ``convert_to_r_matrix`` function can be replaced by the normal
6666
``pandas2ri.py2ri`` to convert dataframes, with a subsequent call to R

doc/source/whatsnew/v0.20.0.txt

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -271,6 +271,9 @@ Deprecations
271271
Removal of prior version deprecations/changes
272272
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
273273

274+
- The ``pandas.rpy`` module is removed. Similar functionality can be accessed
275+
through the `rpy2 <https://rpy2.readthedocs.io/>`__ project.
276+
See the :ref:`R interfacing docs <rpy>` for more details.
274277
- ``pd.to_datetime`` and ``pd.to_timedelta`` have dropped the ``coerce`` parameter in favor of ``errors`` (:issue:`13602`)
275278

276279

pandas/api/tests/test_api.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@ class TestPDApi(Base, tm.TestCase):
3030

3131
# these are optionally imported based on testing
3232
# & need to be ignored
33-
ignored = ['tests', 'rpy', 'locale']
33+
ignored = ['tests', 'locale']
3434

3535
# top-level sub-packages
3636
lib = ['api', 'compat', 'computation', 'core',

pandas/rpy/__init__.py

Lines changed: 0 additions & 18 deletions
This file was deleted.

pandas/rpy/base.py

Lines changed: 0 additions & 14 deletions
This file was deleted.

0 commit comments

Comments
 (0)