So maybe we need to add dict.ordered() which returns a view on the items that is a Sequence rather than a set? Or ordereditems(), orderedkeys() and orderedvalues()?

On Fri, Jul 31, 2020 at 05:29 Ricky Teachey <> wrote:

The punchline of Wes Turner's notebook (very well put together, thank you!) seems to partly be that if you find yourself wanting to work with the position of items in a dict, you might want to consider using a pandas.Series (with it's .iloc method).

A difficulty that immediately came to mind with this advice is type hinting support. I was just googling yesterday for "how to type hint using pandas" and the only thing I found is to use pd.Series and pd.DataFrame directly.

But those don't support type hinting comparable to:

Dict[str, float]


class Vector(TypedDict):
    i: float
    j: float

This is a big downside of the advice "just use pandas". Although I love using pandas and use it all the time. 
Python-ideas mailing list --
To unsubscribe send an email to
Message archived at
Code of Conduct:
--Guido (mobile)