質問するログイン新規登録

回答編集履歴

3

プライバシー

2019/06/13 08:28

投稿

Ma_a
Ma_a

スコア20

answer CHANGED
@@ -3,7 +3,7 @@
3
3
  import json
4
4
  import requests
5
5
 
6
- path = '/Users/xxx/Documents/PySrc/test1.csv'
6
+ path = '/Users/xxx/Documents/src/test1.csv'
7
7
 
8
8
  csvfile = open(path, 'r',encoding="utf-8")
9
9
  jsonfile = open('demo.json', 'w',encoding="utf-8")

2

フォルダ名

2019/06/13 08:28

投稿

Ma_a
Ma_a

スコア20

answer CHANGED
@@ -4,23 +4,16 @@
4
4
  import requests
5
5
 
6
6
  path = '/Users/xxx/Documents/PySrc/test1.csv'
7
- jpath = '/Users/xxx/Documents/xxx/Source/demo.json'
8
7
 
9
-
10
8
  csvfile = open(path, 'r',encoding="utf-8")
11
9
  jsonfile = open('demo.json', 'w',encoding="utf-8")
12
10
 
13
- #fieldnames = ("key","value1","value2")
14
11
  reader = csv.DictReader(csvfile)
15
12
 
16
-
17
13
  for row in reader:
18
14
 
19
15
  json.dump(row, jsonfile, ensure_ascii=False)
20
16
 
21
-
22
-
23
-
24
17
  #Jsonデータ送信用
25
18
 
26
19
  data = row

1

プライバシー的な問題で変更

2019/06/13 08:28

投稿

Ma_a
Ma_a

スコア20

answer CHANGED
@@ -3,8 +3,8 @@
3
3
  import json
4
4
  import requests
5
5
 
6
- path = '/Users/n_maemoto/Documents/PySrc/test1.csv'
6
+ path = '/Users/xxx/Documents/PySrc/test1.csv'
7
- jpath = '/Users/n_maemoto/Documents/lookrec-dicom-tools/Source/reportCsvSender/Source/demo.json'
7
+ jpath = '/Users/xxx/Documents/xxx/Source/demo.json'
8
8
 
9
9
 
10
10
  csvfile = open(path, 'r',encoding="utf-8")
@@ -24,7 +24,7 @@
24
24
  #Jsonデータ送信用
25
25
 
26
26
  data = row
27
- r = requests.post("http://localhost:8000/", data=data)
27
+ r = requests.post("http://localhost:xxx/", data=data)
28
28
 
29
29
  ```
30
30