Skip to content

DOC: add deprecated to docstring of Series.data/itemsize/strides/flags/base #26132

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

Merged
Merged
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
10 changes: 10 additions & 0 deletions pandas/core/base.py
Original file line number Diff line number Diff line change
Expand Up @@ -703,6 +703,8 @@ def item(self):
def data(self):
"""
Return the data pointer of the underlying data.

.. deprecated:: 0.23.0
"""
warnings.warn("{obj}.data is deprecated and will be removed "
"in a future version".format(obj=type(self).__name__),
Expand All @@ -713,6 +715,8 @@ def data(self):
def itemsize(self):
"""
Return the size of the dtype of the item of the underlying data.

.. deprecated:: 0.23.0
"""
warnings.warn("{obj}.itemsize is deprecated and will be removed "
"in a future version".format(obj=type(self).__name__),
Expand All @@ -730,6 +734,8 @@ def nbytes(self):
def strides(self):
"""
Return the strides of the underlying data.

.. deprecated:: 0.23.0
"""
warnings.warn("{obj}.strides is deprecated and will be removed "
"in a future version".format(obj=type(self).__name__),
Expand All @@ -747,6 +753,8 @@ def size(self):
def flags(self):
"""
Return the ndarray.flags for the underlying data.

.. deprecated:: 0.23.0
"""
warnings.warn("{obj}.flags is deprecated and will be removed "
"in a future version".format(obj=type(self).__name__),
Expand All @@ -757,6 +765,8 @@ def flags(self):
def base(self):
"""
Return the base object if the memory of the underlying data is shared.

.. deprecated:: 0.23.0
"""
warnings.warn("{obj}.base is deprecated and will be removed "
"in a future version".format(obj=type(self).__name__),
Expand Down