Last active
August 29, 2015 14:07
-
-
Save hanksudo/4946d136081d8f9c34c7 to your computer and use it in GitHub Desktop.
read CSV demo in Python 2.7
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/env python | |
# -*- coding: utf-8 -*- | |
import csv | |
with open('sample_data.csv') as f: | |
for row in csv.reader(f): | |
print row |
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
1 | Apple | |
---|---|---|
2 | HTC | |
3 | Samsung | |
4 | Sony | |
5 | Microsoft |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment