Skip to content

Commit d279726

Browse files
authored
CLN remove dataframe api consortium entrypoint (#57482)
remove dataframe api consortium entrypoint
1 parent 9c02050 commit d279726

File tree

11 files changed

+1
-70
lines changed

11 files changed

+1
-70
lines changed

.github/workflows/package-checks.yml

+1-1
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ jobs:
2424
runs-on: ubuntu-22.04
2525
strategy:
2626
matrix:
27-
extra: ["test", "performance", "computation", "fss", "aws", "gcp", "excel", "parquet", "feather", "hdf5", "spss", "postgresql", "mysql", "sql-other", "html", "xml", "plot", "output-formatting", "clipboard", "compression", "consortium-standard", "all"]
27+
extra: ["test", "performance", "computation", "fss", "aws", "gcp", "excel", "parquet", "feather", "hdf5", "spss", "postgresql", "mysql", "sql-other", "html", "xml", "plot", "output-formatting", "clipboard", "compression", "all"]
2828
fail-fast: false
2929
name: Install Extras - ${{ matrix.extra }}
3030
concurrency:

ci/deps/actions-311-downstream_compat.yaml

-1
Original file line numberDiff line numberDiff line change
@@ -74,5 +74,4 @@ dependencies:
7474
- pip:
7575
- adbc-driver-postgresql>=0.8.0
7676
- adbc-driver-sqlite>=0.8.0
77-
- dataframe-api-compat>=0.1.7
7877
- tzdata>=2022.7

ci/deps/actions-39-minimum_versions.yaml

-1
Original file line numberDiff line numberDiff line change
@@ -62,5 +62,4 @@ dependencies:
6262
- pip:
6363
- adbc-driver-postgresql==0.8.0
6464
- adbc-driver-sqlite==0.8.0
65-
- dataframe-api-compat==0.1.7
6665
- tzdata==2022.7

doc/source/getting_started/install.rst

-11
Original file line numberDiff line numberDiff line change
@@ -417,14 +417,3 @@ Dependency Minimum Version pip extra Notes
417417
========================= ================== =============== =============================================================
418418
Zstandard 0.19.0 compression Zstandard compression
419419
========================= ================== =============== =============================================================
420-
421-
Consortium Standard
422-
^^^^^^^^^^^^^^^^^^^
423-
424-
Installable with ``pip install "pandas[consortium-standard]"``
425-
426-
========================= ================== =================== =============================================================
427-
Dependency Minimum Version pip extra Notes
428-
========================= ================== =================== =============================================================
429-
dataframe-api-compat 0.1.7 consortium-standard Consortium Standard-compatible implementation based on pandas
430-
========================= ================== =================== =============================================================

environment.yml

-1
Original file line numberDiff line numberDiff line change
@@ -117,6 +117,5 @@ dependencies:
117117
- pip:
118118
- adbc-driver-postgresql>=0.8.0
119119
- adbc-driver-sqlite>=0.8.0
120-
- dataframe-api-compat>=0.1.7
121120
- typing_extensions; python_version<"3.11"
122121
- tzdata>=2022.7

pandas/compat/_optional.py

-1
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,6 @@
2424
"bs4": "4.11.2",
2525
"blosc": "1.21.3",
2626
"bottleneck": "1.3.6",
27-
"dataframe-api-compat": "0.1.7",
2827
"fastparquet": "2023.04.0",
2928
"fsspec": "2022.11.0",
3029
"html5lib": "1.1",

pandas/core/frame.py

-15
Original file line numberDiff line numberDiff line change
@@ -941,21 +941,6 @@ def __dataframe__(
941941

942942
return PandasDataFrameXchg(self, allow_copy=allow_copy)
943943

944-
def __dataframe_consortium_standard__(
945-
self, *, api_version: str | None = None
946-
) -> Any:
947-
"""
948-
Provide entry point to the Consortium DataFrame Standard API.
949-
950-
This is developed and maintained outside of pandas.
951-
Please report any issues to https://github.com/data-apis/dataframe-api-compat.
952-
"""
953-
dataframe_api_compat = import_optional_dependency("dataframe_api_compat")
954-
convert_to_standard_compliant_dataframe = (
955-
dataframe_api_compat.pandas_standard.convert_to_standard_compliant_dataframe
956-
)
957-
return convert_to_standard_compliant_dataframe(self, api_version=api_version)
958-
959944
def __arrow_c_stream__(self, requested_schema=None):
960945
"""
961946
Export the pandas DataFrame as an Arrow C stream PyCapsule.

pandas/core/series.py

-17
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,6 @@
3333
from pandas._libs.lib import is_range_indexer
3434
from pandas.compat import PYPY
3535
from pandas.compat._constants import REF_COUNT
36-
from pandas.compat._optional import import_optional_dependency
3736
from pandas.compat.numpy import function as nv
3837
from pandas.errors import (
3938
ChainedAssignmentError,
@@ -846,22 +845,6 @@ def __array__(self, dtype: npt.DTypeLike | None = None) -> np.ndarray:
846845

847846
# ----------------------------------------------------------------------
848847

849-
def __column_consortium_standard__(self, *, api_version: str | None = None) -> Any:
850-
"""
851-
Provide entry point to the Consortium DataFrame Standard API.
852-
853-
This is developed and maintained outside of pandas.
854-
Please report any issues to https://github.com/data-apis/dataframe-api-compat.
855-
"""
856-
dataframe_api_compat = import_optional_dependency("dataframe_api_compat")
857-
return (
858-
dataframe_api_compat.pandas_standard.convert_to_standard_compliant_column(
859-
self, api_version=api_version
860-
)
861-
)
862-
863-
# ----------------------------------------------------------------------
864-
865848
# indexers
866849
@property
867850
def axes(self) -> list[Index]:

pandas/tests/test_downstream.py

-19
Original file line numberDiff line numberDiff line change
@@ -306,25 +306,6 @@ def test_from_obscure_array(dtype, box):
306306
tm.assert_index_equal(result, expected)
307307

308308

309-
def test_dataframe_consortium() -> None:
310-
"""
311-
Test some basic methods of the dataframe consortium standard.
312-
313-
Full testing is done at https://github.com/data-apis/dataframe-api-compat,
314-
this is just to check that the entry point works as expected.
315-
"""
316-
pytest.importorskip("dataframe_api_compat")
317-
df_pd = DataFrame({"a": [1, 2, 3], "b": [4, 5, 6]})
318-
df = df_pd.__dataframe_consortium_standard__()
319-
result_1 = df.get_column_names()
320-
expected_1 = ["a", "b"]
321-
assert result_1 == expected_1
322-
323-
ser = Series([1, 2, 3], name="a")
324-
col = ser.__column_consortium_standard__()
325-
assert col.name == "a"
326-
327-
328309
def test_xarray_coerce_unit():
329310
# GH44053
330311
xr = pytest.importorskip("xarray")

pyproject.toml

-2
Original file line numberDiff line numberDiff line change
@@ -84,14 +84,12 @@ plot = ['matplotlib>=3.6.3']
8484
output-formatting = ['jinja2>=3.1.2', 'tabulate>=0.9.0']
8585
clipboard = ['PyQt5>=5.15.9', 'qtpy>=2.3.0']
8686
compression = ['zstandard>=0.19.0']
87-
consortium-standard = ['dataframe-api-compat>=0.1.7']
8887
all = ['adbc-driver-postgresql>=0.8.0',
8988
'adbc-driver-sqlite>=0.8.0',
9089
'beautifulsoup4>=4.11.2',
9190
# blosc only available on conda (https://github.com/Blosc/python-blosc/issues/297)
9291
#'blosc>=1.21.3',
9392
'bottleneck>=1.3.6',
94-
'dataframe-api-compat>=0.1.7',
9593
'fastparquet>=2023.04.0',
9694
'fsspec>=2022.11.0',
9795
'gcsfs>=2022.11.0',

requirements-dev.txt

-1
Original file line numberDiff line numberDiff line change
@@ -85,6 +85,5 @@ requests
8585
pygments
8686
adbc-driver-postgresql>=0.8.0
8787
adbc-driver-sqlite>=0.8.0
88-
dataframe-api-compat>=0.1.7
8988
typing_extensions; python_version<"3.11"
9089
tzdata>=2022.7

0 commit comments

Comments
 (0)