Having bunch of slice(None)
in multilevel indexes (>=3 levels) looks pretty unreadable.
Does it make sense to have an alias, maybe pd.any
?
For example in numpy the np.newaxis
is alias for None
:
https://docs.scipy.org/doc/numpy-1.13.0/reference/arrays.indexing.html#numpy.newaxis
Comment From: max-sixty
Have you checked out pd.IndexSlice
?
Comment From: jreback
this is fully documented here: http://pandas.pydata.org/pandas-docs/stable/advanced.html#using-slicers
Comment From: den-run-ai
I was not aware about IndexSlice! Thanks for the tip.
On Wed, Feb 7, 2018, 6:55 PM Jeff Reback notifications@github.com wrote:
Closed #19578 https://github.com/pandas-dev/pandas/issues/19578.
— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/pandas-dev/pandas/issues/19578#event-1463617776, or mute the thread https://github.com/notifications/unsubscribe-auth/AHgZ5Zo4UVhqbdueZ1-o4QbdMZY7E5D4ks5tSkX0gaJpZM4R9BXg .