What is the data format returned by the AdWords API TargetingIdeaPage service?
<p>When I query the AdWords API to get <a href="https://developers.google.com/adwords/api/docs/guides/targeting-idea-service#get_search_volume_data_and_trends" rel="nofollow">search volume data and trends through their TargetingIdeaSelector</a> using the <a href="https://github.com/googleads/googleads-python-lib/blob/master/examples/adwords/v201601/optimization/get_keyword_ideas.py" rel="nofollow">Python client library</a> the returned data looks like this:</p>

<pre><code>(TargetingIdeaPage){
       totalNumEntries = 1
       entries[] = 
          (TargetingIdea){
             data[] = 
                (Type_AttributeMapEntry){
                   key = "KEYWORD_TEXT"
                   value = 
                      (StringAttribute){
                         Attribute.Type = "StringAttribute"
                         value = "keyword phrase"
                      }
                },
                (Type_AttributeMapEntry){
                   key = "TARGETED_MONTHLY_SEARCHES"
                   value = 
                      (MonthlySearchVolumeAttribute){
                         Attribute.Type = "MonthlySearchVolumeAttribute"
                         value[] = 
                            (MonthlySearchVolume){
                               year = 2016
                               month = 2
                               count = 2900
                            },
                            ...
                            (MonthlySearchVolume){
                               year = 2015
                               month = 3
                               count = 2900
                            },
                      }
                },
          },
     }
</code></pre>

<p>This isn't JSON and appears to just be a messy Python list. What's the easiest way to flatten the monthly data into a Pandas dataframe with a structure like this?</p>

<pre><code>Keyword         |  Year  | Month | Count
 keyword phrase    2016      2       10
</code></pre>