title: How to list all the names and ages associated with each activity
body: <p>I have a dataframe that contains information about which people are taking part in each activity. Unfortunately there are up to a number of different places each piece of information can be put. That is one row can give information for many different people. The column names are as follows:</p>
  
  <pre><code>['Name', 'Activity', 'Name.0', 'Age.0', 'Activity.0', 'Name.1', 'Age.1', 'Activity.1', 'Name.2', 'Age.2', 'Activity.2', 'Name.3', 'Age.3',  'Activity.3', 'Name.4', 'Age.4', 'Activity.4']
  </code></pre>
  
  <p>For each Activity, I want to list all the people who are associated with it and their ages (if that information is provided). Ultimately I want to make one table per Activity. How can I do that?</p>
  
  <p>It feels like I need to first need to deal with all the .* column names and then groupby Activity somehow but I am not sure how to do it.</p>
  
  <p>Here is some anonymized data outputted using <code>df.sample(5).to_dict()</code>.</p>
  
  <pre><code>{'Activity': {0: 'Audi', 1: 'Carn', 2: 'Pop-', 3: 'Samb', 4: 'Pre-'},
   'Activity.0': {0: 'Samb', 1: 'Pre-', 2: 'nan', 3: 'Samb', 4: 'Pre-'},
   'Activity.1': {0: 'Samb', 1: 'Audi', 2: 'nan', 3: 'Samb', 4: 'nan'},
   'Activity.2': {0: 'Pre-', 1: 'Audi', 2: 'nan', 3: 'nan', 4: 'nan'},
   'Activity.3': {0: 'nan', 1: 'Carn', 2: 'nan', 3: 'nan', 4: 'nan'},
   'Activity.4': {0: 'nan', 1: 'Carn', 2: 'nan', 3: 'nan', 4: 'nan'},
   'Age.0': {0: '18+', 1: 'Under 5', 2: '11', 3: '11', 4: 'Under 5'},
   'Age.1': {0: '11', 1: 'Under 5', 2: '11', 3: 17, 4: '18+'},
   'Age.2': {0: '11', 1: '18+', 2: 'nan', 3: '18+', 4: 'nan'},
   'Age.3': {0: 'Under 5', 1: '18+', 2: 'nan', 3: 'nan', 4: 'nan'},
   'Age.4': {0: 'nan', 1: '18+', 2: 'nan', 3: 'nan', 4: 'nan'},
   'Name': {0: 'Jess', 1: 'Tama', 2: 'Beki', 3: 'Havi', 4: 'Dror'},
   'Name.0': {0: 'Sam ', 1: 'Lila', 2: 'nan', 3: 'Joel', 4: 'Emil'},
   'Name.1': {0: 'Zipp', 1: 'Marg', 2: 'nan', 3: 'Solo', 4: 'Ari '},
   'Name.2': {0: 'Reub', 1: 'Joan', 2: 'nan', 3: 'Sami', 4: 'nan'},
   'Name.3': {0: 'Shev', 1: 'John', 2: 'nan', 3: 'nan', 4: 'nan'},
   'Name.4': {0: 'nan', 1: 'Edwa', 2: 'nan', 3: 'nan', 4: 'nan'}}
  </code></pre>
  
  <p>For this example, let's take the activity called 'Audi'.  The only people doing this are 'Jess' (no age), 'Marge' (under 5) and 'Joan' (18+).  For the activity 'Samb', the people associated with it are 'Havi' (no age), 'Sam' (18+), 'Joel' (11),'Zipp' (11) and 'Solo' (17).   I would like the same thing for each of the activities.</p>