Created
June 18, 2012 11:59
-
-
Save isann/2948036 to your computer and use it in GitHub Desktop.
csvからデータを読み込む(ダブルクォーテーションの改行フィールドもよろしくしてくれる)
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
# -*- coding: utf-8 -*- | |
import csv | |
__author__ = 'isann' | |
def main(): | |
filename = 'data.csv' | |
file = open(filename) | |
dialect = csv.excel | |
for row in csv.reader(file, dialect): | |
print(row) | |
# for elem in row: | |
# print(elem) | |
file.close() | |
if __name__ == "__main__": | |
main() |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment