You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
This results from the combination of two problems.
DatetimeIndex.map() does some pretty horrible thing: it first tries to call the passed function on the calling instance, and only if this fails (according to some debatable definition of "failure") it calls it on each element of the instance. freq is preserved if the first call goes through; otherwise it is not.
toobaz
added
Index
Related to the Index class or subclasses
and removed
Indexing
Related to indexing on series/frames, not to indexes themselves
labels
Jun 29, 2019
Code Sample, a copy-pastable example if possible
Problem description
This results from the combination of two problems.
DatetimeIndex.map()
does some pretty horrible thing: it first tries to call the passed function on the calling instance, and only if this fails (according to some debatable definition of "failure") it calls it on each element of the instance.freq
is preserved if the first call goes through; otherwise it is not.... but problem 1. must fixed anyway - the behavior doesn't make much sense, is
DatetimeIndex
-specific, and undocumented.Expected Output
Out[3]
andOut[4]
should coincide.Output of
pd.show_versions()
[paste the output of
pd.show_versions()
here below this line]The text was updated successfully, but these errors were encountered: