Hi Eric,
It would have to be from a different perspective. You use GAM to get access to the information but GAM does not process data, what you would do is to use Python to process the downloaded data, read it and process it how you want it. You can take this as an example:
teamDriveNames = {}
inputFile = open(sys.argv[2], 'r', encoding='utf-8')
for row in csv.DictReader(inputFile, quotechar=QUOTE_CHAR):
teamDriveNames[row['id']] = row['name']
inputFile.close()
This is taken out of the python script for processing a file to create a CSV of permissions, you can see it here:
Regards