Skip to article frontmatterSkip to article content
Site not loading correctly?

This may be due to an incorrect BASE_URL configuration. See the MyST Documentation for reference.

Convert between a pandas.Series and a Dict-Like Object

Things on this page are fragmentary and immature notes/thoughts of the author. Please read with your own judgement!

Series to dict

0 how 1 are 2 you dtype: object
{0: 'how', 1: 'are', 2: 'you'}

dict to Series

{'how': 0, 'are': 2, 'you': 1}
how 0 are 2 you 1 dtype: int64