Last active
February 3, 2018 00:19
-
-
Save sbiyyala/a37f62f27d98a4edc3ac2dfed34c77c9 to your computer and use it in GitHub Desktop.
Extract attendees for a meetup (new UI's csv download)
This file contains hidden or 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
#!/usr/bin/env python | |
# -*- coding: latin-1 -*- | |
import sys, numpy as np | |
import codecs | |
''' | |
numpy is a pre-req, | |
$ pip install numpy | |
$ ./extract_attendees.py > final_attendees.(txt|csv) | |
''' | |
def main(argv): | |
filecp = codecs.open('attendees.csv', encoding = 'cp1252') | |
name_nd_array = np.loadtxt(filecp, dtype=str, delimiter=',', skiprows=1, usecols=(0, 9)) | |
print '\n'.join([x[1] if x[1] != '' else x[0] for x in name_nd_array]) | |
if __name__ == '__main__': | |
exit(main(sys.argv)) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment