Dictionary linking elements from multiple sets together (in python)?

I’m looking for a dictionary-like data-structure (preferably in numpy or pandas) to deal with elements from different sets being grouped together
For example, I have data about People giving Ratings to different Cats.
If D is the data stru…