Skip to content

Commit 8787a9f

Browse files
authored
Remove deprecated Series.data (#20914)
xref #20281 Deprecated in 25.12 (this is not pandas 3 related) Authors: - Matthew Roeschke (https://github.com/mroeschke) - GALI PREM SAGAR (https://github.com/galipremsagar) Approvers: - GALI PREM SAGAR (https://github.com/galipremsagar) URL: #20914
1 parent 8ba6374 commit 8787a9f

4 files changed

Lines changed: 1 addition & 37 deletions

File tree

docs/cudf/source/user_guide/api_docs/series.rst

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,6 @@ Attributes
2222
Series.iat
2323
Series.index
2424
Series.values
25-
Series.data
2625
Series.dtype
2726
Series.dtypes
2827
Series.shape

python/cudf/cudf/core/series.py

Lines changed: 0 additions & 30 deletions
Original file line numberDiff line numberDiff line change
@@ -2001,36 +2001,6 @@ def to_pandas(
20012001
res.attrs = self.attrs
20022002
return res
20032003

2004-
@property
2005-
@_performance_tracking
2006-
def data(self):
2007-
"""The gpu buffer for the data
2008-
2009-
Returns
2010-
-------
2011-
out : The GPU buffer of the Series.
2012-
2013-
Examples
2014-
--------
2015-
>>> import cudf
2016-
>>> series = cudf.Series([1, 2, 3, 4])
2017-
>>> series
2018-
0 1
2019-
1 2
2020-
2 3
2021-
3 4
2022-
dtype: int64
2023-
>>> np.array(series.data.memoryview())
2024-
array([1, 0, 0, 0, 0, 0, 0, 0, 2, 0, 0, 0, 0, 0, 0, 0, 3, 0, 0, 0, 0, 0,
2025-
0, 0, 4, 0, 0, 0, 0, 0, 0, 0], dtype=uint8)
2026-
"""
2027-
warnings.warn(
2028-
"Series.data is deprecated and will be removed in a future version. "
2029-
"Use Series.to_pylibcudf()[0].data() instead.",
2030-
FutureWarning,
2031-
)
2032-
return self._column.data
2033-
20342004
@_performance_tracking
20352005
def astype(
20362006
self,

python/cudf/cudf/pandas/scripts/conftest-patch.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10457,6 +10457,7 @@ def set_copy_on_write_option():
1045710457
"tests/indexing/test_iloc.py::TestILocErrors::test_iloc_float_raises[uint64-Series]",
1045810458
"tests/indexing/test_iloc.py::TestiLocBaseIndependent::test_setitem_mix_of_nan_and_interval[NaTType-1.0]",
1045910459
"tests/indexing/test_iloc.py::TestiLocBaseIndependent::test_setitem_mix_of_nan_and_interval[NaTType-a]",
10460+
"tests/indexing/test_iloc.py::TestiLocBaseIndependent::test_setitem_mix_of_nan_and_interval[NAType-a]",
1046010461
"tests/indexing/test_iloc.py::TestiLocBaseIndependent::test_setitem_mix_of_nan_and_interval[float1-1.0]",
1046110462
"tests/indexing/test_loc.py::TestLocWithMultiIndex::test_loc_set_nan_in_categorical_series[Int16]",
1046210463
"tests/io/excel/test_openpyxl.py::test_engine_kwargs_append_data_only[True-0]",

python/cudf/cudf/tests/series/test_attributes.py

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -437,9 +437,3 @@ def test_series_values_property(data):
437437
gds_vals = gds.values
438438
assert isinstance(gds_vals, cp.ndarray)
439439
np.testing.assert_array_equal(gds_vals.get(), pds.values)
440-
441-
442-
def test_series_data_property_deprecated():
443-
s = cudf.Series([1, 2, 3])
444-
with pytest.warns(FutureWarning, match="Series.data is deprecated"):
445-
s.data

0 commit comments

Comments
 (0)