"Parser" to print out only names and emails from Google Groups "Export Members" CSV file
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# 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