
Why are they missing? Are we doing something wrong?
Here's the piece of Python that handles the request:
# REPORT BY REGION
# Create report definition.
report = {
'reportName': 'Last 7 days GEO_PERFORMANCE_REPORT',
'dateRangeType': 'LAST_7_DAYS',
'reportType': 'GEO_PERFORMANCE_REPORT',
'downloadFormat': 'CSV',
'selector': {
'fields': [
'CampaignId', 'CampaignName', 'Date', 'CountryCriteriaId',
'RegionCriteriaId', 'IsTargetingLocation', 'LocationType', 'Device', 'Impressions', 'Clicks', 'Cost'
],
'predicates': [
{
'field': 'IsTargetingLocation',
'operator': 'IN',
'values': [True, False]
},
{
'field': 'LocationType',
'operator': 'EQUALS',
'values': ['LOCATION_OF_PRESENCE']
}
]
}
}
google_csv = io.StringIO()
report_downloader.DownloadReport(
report, google_csv, skip_report_header=True, skip_column_header=False,
skip_report_summary=True, include_zero_impressions=False
)
google_csv.seek(0)
google_device_dataset = pd.read_csv(google_csv, sep=',', encoding='utf8')
google_device_dataset['Cost'] = google_device_dataset['Cost'].apply(lambda x: float(x) / 1000000.0)