質問編集履歴
1
文法の修正
test
CHANGED
File without changes
|
test
CHANGED
@@ -22,46 +22,6 @@
|
|
22
22
|
|
23
23
|
|
24
24
|
|
25
|
-
### ソースコード
|
26
|
-
|
27
|
-
import requests
|
28
|
-
|
29
|
-
import json
|
30
|
-
|
31
|
-
import pandas as pd
|
32
|
-
|
33
|
-
|
34
|
-
|
35
|
-
headers = {
|
36
|
-
|
37
|
-
'***********',
|
38
|
-
|
39
|
-
}
|
40
|
-
|
41
|
-
|
42
|
-
|
43
|
-
response = requests.get('http://**********', headers=headers)
|
44
|
-
|
45
|
-
|
46
|
-
|
47
|
-
df = pd.read_json(response.text)
|
48
|
-
|
49
|
-
df.to_csv("response.csv")
|
50
|
-
|
51
|
-
df = pd.read_csv("response.csv")
|
52
|
-
|
53
|
-
df = df.drop_duplicates()
|
54
|
-
|
55
|
-
df = pd.crosstab(df.node1, df.node2)
|
56
|
-
|
57
|
-
idx = df.columns.union(df.index)
|
58
|
-
|
59
|
-
df = df.reindex(index = idx, columns=idx, fill_value=0)
|
60
|
-
|
61
|
-
|
62
|
-
|
63
|
-
print(df.T)
|
64
|
-
|
65
25
|
|
66
26
|
|
67
27
|
### 補足情報
|