[Python-ideas] PEP pre-draft: Support for indexing with keyword arguments

Stephan Hoyer shoyer at gmail.com
Thu Jul 3 23:00:20 CEST 2014


On Thu, Jul 3, 2014 at 1:48 PM, Sturla Molden <sturla.molden at gmail.com>
wrote:

> Stephan Hoyer <shoyer at gmail.com> wrote:
>
> > Yes, this is true. However, in practice many implementations of labeled
> > arrays would have generic labeled axes, so they would need to use their
> own
> > logic to do the mapping in __getitem__ anyways.
>
> If you are thiniking about Pandas, then each keyword should be allowed to
> take a slice as well.
>
> dataframe[apples=1:3, oranges=2:6]
>

Yes, I am indeed thinking about pandas and other similar libraries.
Supporting slices with keywords would be essential.

Stephan
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.python.org/pipermail/python-ideas/attachments/20140703/43c47e9b/attachment.html>


More information about the Python-ideas mailing list