Skip to content

REF: Remove DatetimelikeArrayMixin._shallow_copy #23430

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 3 commits into from
Nov 2, 2018
Merged
Changes from 1 commit
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
Prev Previous commit
Next Next commit
Remove DatetimelikeArrayMixin._shallow_copy
  • Loading branch information
jbrockmendel committed Oct 31, 2018
commit f7c0382d78f28dc6c908d067dabdf1d06a5e959c
12 changes: 0 additions & 12 deletions pandas/core/arrays/datetimelike.py
Original file line number Diff line number Diff line change
Expand Up @@ -89,18 +89,6 @@ def _get_attributes_dict(self):
"""return an attributes dict for my class"""
return {k: getattr(self, k, None) for k in self._attributes}

def _shallow_copy(self, values=None, **kwargs):
if values is None:
# Note: slightly different from Index implementation which defaults
# to self.values
values = self._ndarray_values

attributes = self._get_attributes_dict()
attributes.update(kwargs)
if not len(values) and 'dtype' not in kwargs:
attributes['dtype'] = self.dtype
return self._simple_new(values, **attributes)


class DatetimeLikeArrayMixin(ExtensionOpsMixin, AttributesMixin):
"""
Expand Down