# 質問編集履歴

2

2017/04/17 00:29

starrow1103

score137

test CHANGED
 File without changes
test CHANGED
 @@ -53,3 +53,27 @@ 53 53 54 54 55 55 ご教授よろしくお願いいたします。。。 56 + 57 + 58 + 59 + 60 + 61 + ## 解決 62 + 63 + 単純に、 64 + 65 + 66 + 67 + ```python 68 + 69 + f = io.StringIO(csv_data) 70 + 71 + data = csv.reader(f, delimiter=',', quotechar='"') 72 + 73 + for row in data: yield row 74 + 75 + ``` 76 + 77 + 78 + 79 + これでいけました

1

2017/04/17 00:28

starrow1103

score137

test CHANGED
 File without changes
test CHANGED
 @@ -16,9 +16,9 @@ 16 16 17 17 response = urllib.request.urlopen(url) 18 18 19 - csv = response.read().decode('utf-8') 19 + csv_data = response.read().decode('utf-8') 20 20 21 - csv_file = io.StringIO(csv) #メモリにオブジェクトとして保存 21 + csv_file = io.StringIO(csv_data) #メモリにオブジェクトとして保存 22 22 23 23 24 24 @@ -36,7 +36,7 @@ 36 36 37 37 ```python 38 38 39 - with open(self.csv_file,'r',encoding="utf-8") as f: 39 + with open(csv_file,'r',encoding="utf-8") as f: 40 40 41 41 data = csv.reader(f, delimiter=',', quotechar='"') 42 42