Does .loc[...] behave naturally? #471
kennethshsu
started this conversation in
General
Replies: 1 comment
-
I think this has to do with the dtype of the origin axis. It is a PeriodIndex and that is how it's design in pandas. If we were to use a datetime (like the valuation axis) it would be not need quotes I believe. As an aside I find that PeriodIndex, bring a less prominent dtype leads to confusion in general. Periods also don't have a direct mapping in the arrow standard so moving to a pure date/datetime dtype might be a sensible move eventually. |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
I've been thinking about this for quite a while, but I also don't know if something is actually wrong. However, I do feel that when
.loc[...]
is called, the behavior is not natural.Look at this example:
It's true that both
chainladder
andpandas
's behaviors are identical, but why is the year quoted and the age not?24
(when not quote), feels more like an index to me.Beta Was this translation helpful? Give feedback.
All reactions