# Access keys of pandas dataframe when using groupby

I have the following database:

And I would like to know how many times a combination of BirthDate and Zipcode is repeated throughout the data table:

Now, my question is: How can I access the keys of this output? For instance, how can I get Birthdate=2000101 ZipCode=8002, for i = 0?

The problem is that this is a 'Series' object, so I'm not able to use .columns or .loc here.

• BTW the first image looks like confidential data, maybe you should delete it Feb 3 at 11:55
• @DavidMasip No, no. It's fake! Gràcies! Feb 3 at 14:38
df.groupby(['BirthDate', 'ZipCode']).size().reset_index().rename(columns={0: 'n'})