Skip to content

Instantly share code, notes, and snippets.

@markcerqueira
Created September 8, 2015 20:07
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save markcerqueira/c969c14efcd7a8666c96 to your computer and use it in GitHub Desktop.
Save markcerqueira/c969c14efcd7a8666c96 to your computer and use it in GitHub Desktop.
"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