Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
"Parser" to print out only names and emails from Google Groups "Export Members" CSV file
# google_groups_csv_parse.py
# Author: Mark Cerqueira
#
# Strips out names and emails from Google Groups members list export
#
# 1. Download CSV from Export Members option in Google Groups
# 2. Name file stanfordkendo.csv and place in same directory as this script
# 3. Run it! e.g. $ python google_groups_csv_parser.py | pbcopy
import csv
with open('stanfordkendo.csv', 'rb') as csvfile:
csv_reader = csv.reader(csvfile, delimiter=',', quotechar='|')
# Skip over the 2 "header" lines
csv_reader.next();
csv_reader.next();
for row in csv_reader:
# prints name, a space, and then email
print row[1] + " " + row[0]
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.