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
BUG: Add frequency to DatetimeArray/TimedeltaArray take #58382
base: main
Are you sure you want to change the base?
BUG: Add frequency to DatetimeArray/TimedeltaArray take #58382
Conversation
19d396d
to
5440815
Compare
30a69e1
to
30be34a
Compare
195a9a5
to
e67ca27
Compare
pandas/core/indexes/multi.py
Outdated
@@ -1244,7 +1244,9 @@ def _constructor(self) -> Callable[..., MultiIndex]: # type: ignore[override] | |||
return type(self).from_tuples | |||
|
|||
@doc(Index._shallow_copy) | |||
def _shallow_copy(self, values: np.ndarray, name=lib.no_default) -> MultiIndex: | |||
def _shallow_copy( |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
if the options are doing this in take or shallow_copy, take is definitely preferred
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
done -- implemented via take
d49d42c
to
b2a244a
Compare
cae8e63
to
ceb3633
Compare
3c92b3e
to
4bedc39
Compare
4bedc39
to
9b480bf
Compare
|
||
if isinstance(maybe_slice, slice): | ||
freq = self._get_getitem_freq(maybe_slice) | ||
result.freq = freq |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
i think if you set result._freq it will be more performant
doc/source/whatsnew/vX.X.X.rst
file if fixing a bug or adding a new feature.Disclaimer
I am required to add that the software is provided "as is", without warranty of any kind, express or implied, including but not limited to the warranties of merchantability, fitness for a particular purpose and noninfringement. In no event shall the authors or copyright holders be liable for any claim, damages or other liability, whether in an action of contract, tort or otherwise, arising from, out of or in connection with the software or the use or other dealings in the software.