Created
September 22, 2018 19:34
-
-
Save smoofra/280a278a682255b8a4c789ac63d50c9b to your computer and use it in GitHub Desktop.
csv parser example
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
#!/usr/bin/python | |
import csv | |
from StringIO import StringIO | |
with open('test.csv', 'rb') as f: | |
data = f.read().decode('utf8') | |
# remove unicode byte-order marker if it exists | |
if data.startswith(u'\uFEFF'): | |
data = data[1:] | |
reader = csv.reader(StringIO(data)) | |
rows = iter(reader) | |
header = next(rows) | |
for row in rows: | |
fields = dict(zip(header, row)) | |
print fields['Team'], fields['Comment'] | |
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
Team | Project | File | File URL | Version | Commenter | Comment ID | Comment | Reply | Commented At | Complete | Frame | Timecode | Timecode Source | Annotation | |
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
"DC Color" | "Creepy Line Shot Swaps" | "TheCreepyLine_1080p24_239Letterbox_H264_Texted_SurroundOnly_Rev_9_16_18_NoBlack.mp4" | https://app.frame.io/?f=94e5cc40-f3b2-496f-b89c-43683f4c7db1 | 1 | "Robbie Carman" | 4b5f2655-d802-4490-b5bf-e5cdb7adeca1 | "test test" | no | 2018-09-22 06:26:57 PM | no | 13358 | 00:09:16:14 | 00:09:16:14 | no | |
"DC Color" | "Creepy Line Shot Swaps" | "TheCreepyLine_1080p24_239Letterbox_H264_Texted_SurroundOnly_Rev_9_16_18_NoBlack.mp4" | https://app.frame.io/?f=94e5cc40-f3b2-496f-b89c-43683f4c7db1 | 1 | "Robbie Carman" | 558fbe8a-cd09-4ad3-9f91-f87c50037715 | "test 1" | no | 2018-09-22 05:59:39 PM | no | 41177 | 00:28:35:17 | 00:28:35:17 | no | |
"DC Color" | "Creepy Line Shot Swaps" | "TheCreepyLine_1080p24_239Letterbox_H264_Texted_SurroundOnly_Rev_9_16_18_NoBlack.mp4" | https://app.frame.io/?f=94e5cc40-f3b2-496f-b89c-43683f4c7db1 | 1 | "Robbie Carman" | cca497c9-51ae-4060-88eb-3190e6e0a80c | "test2" | no | 2018-09-22 05:59:33 PM | no | 51814 | 00:35:58:22 | 00:35:58:22 | no | |
"DC Color" | "Creepy Line Shot Swaps" | "TheCreepyLine_1080p24_239Letterbox_H264_Texted_SurroundOnly_Rev_9_16_18_NoBlack.mp4" | https://app.frame.io/?f=94e5cc40-f3b2-496f-b89c-43683f4c7db1 | 1 | "Robbie Carman" | cf7c37a1-6f53-4388-b76e-16b0a3bd7b1f | "test4" | no | 2018-09-22 06:18:30 PM | no | 3300 | 00:02:17:12 | 00:02:17:12 | no | |
"DC Color" | "Creepy Line Shot Swaps" | "TheCreepyLine_1080p24_239Letterbox_H264_Texted_SurroundOnly_Rev_9_16_18_NoBlack.mp4" | https://app.frame.io/?f=94e5cc40-f3b2-496f-b89c-43683f4c7db1 | 1 | "Robbie Carman" | f78eefba-0963-4489-b78b-3b596e9855ad | "test again" | no | 2018-09-22 06:26:48 PM | no | 5468 | 00:03:47:20 | 00:03:47:20 | no |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment