質問編集履歴

2

文法の修正

2019/10/11 15:31

投稿

arupaka_910
arupaka_910

スコア6

test CHANGED
File without changes
test CHANGED
@@ -72,19 +72,15 @@
72
72
 
73
73
  ↓実行時のターミナル画面です。
74
74
 
75
-
75
+ (header=None追加後のエラー)
76
76
 
77
77
  Traceback (most recent call last):
78
78
 
79
- File "/Users/.pyenv/versions/anaconda3-4.2.0/lib/python3.5/site-packages/pandas/indexes/base.py", line 1986, in get_value
79
+ File "pandas/index.pyx", line 159, in pandas.index.IndexEngine.get_loc (pandas/index.c:4018)
80
80
 
81
- return tslib.get_value_box(s, key)
81
+ File "pandas/hashtable.pyx", line 303, in pandas.hashtable.Int64HashTable.get_item (pandas/hashtable.c:6589)
82
82
 
83
- File "pandas/tslib.pyx", line 777, in pandas.tslib.get_value_box (pandas/tslib.c:17017)
84
-
85
- File "pandas/tslib.pyx", line 786, in pandas.tslib.get_value_box (pandas/tslib.c:16691)
86
-
87
- TypeError: 'str' object cannot be interpreted as an integer
83
+ TypeError: an integer is required
88
84
 
89
85
 
90
86
 
@@ -102,10 +98,6 @@
102
98
 
103
99
  result = self.index.get_value(self, key)
104
100
 
105
- File "/Users/.pyenv/versions/anaconda3-4.2.0/lib/python3.5/site-packages/pandas/indexes/base.py", line 1994, in get_value
106
-
107
- raise e1
108
-
109
101
  File "/Users/.pyenv/versions/anaconda3-4.2.0/lib/python3.5/site-packages/pandas/indexes/base.py", line 1980, in get_value
110
102
 
111
103
  tz=getattr(series.dtype, 'tz', None))
@@ -114,14 +106,12 @@
114
106
 
115
107
  File "pandas/index.pyx", line 111, in pandas.index.IndexEngine.get_value (pandas/index.c:3035)
116
108
 
117
- File "pandas/index.pyx", line 159, in pandas.index.IndexEngine.get_loc (pandas/index.c:4018)
109
+ File "pandas/index.pyx", line 161, in pandas.index.IndexEngine.get_loc (pandas/index.c:4084)
118
-
119
- File "pandas/hashtable.pyx", line 675, in pandas.hashtable.PyObjectHashTable.get_item (pandas/hashtable.c:12368)
120
-
121
- File "pandas/hashtable.pyx", line 683, in pandas.hashtable.PyObjectHashTable.get_item (pandas/hashtable.c:12322)
122
110
 
123
111
  KeyError: '0'
124
112
 
125
113
 
126
114
 
115
+
116
+
127
117
  宜しくお願い致します。

1

文法修正

2019/10/11 15:31

投稿

arupaka_910
arupaka_910

スコア6

test CHANGED
File without changes
test CHANGED
@@ -2,7 +2,7 @@
2
2
 
3
3
 
4
4
 
5
- https://gukoulog.com/2018/10/07/python-4/ <<<参考サイトのURL
5
+ [リンク内容](https://gukoulog.com/2018/10/07/python-4/) <<<参考サイト
6
6
 
7
7
 
8
8
 
@@ -68,10 +68,60 @@
68
68
 
69
69
 
70
70
 
71
+ ネットの対処方を試してみたのですが、結果は同じでした。
72
+
71
73
  ↓実行時のターミナル画面です。
72
74
 
73
- ネットの対象方を試してみたのですが、結果は同じでした。
74
75
 
76
+
77
+ Traceback (most recent call last):
78
+
79
+ File "/Users/.pyenv/versions/anaconda3-4.2.0/lib/python3.5/site-packages/pandas/indexes/base.py", line 1986, in get_value
80
+
81
+ return tslib.get_value_box(s, key)
82
+
83
+ File "pandas/tslib.pyx", line 777, in pandas.tslib.get_value_box (pandas/tslib.c:17017)
84
+
85
+ File "pandas/tslib.pyx", line 786, in pandas.tslib.get_value_box (pandas/tslib.c:16691)
86
+
87
+ TypeError: 'str' object cannot be interpreted as an integer
88
+
89
+
90
+
91
+ During handling of the above exception, another exception occurred:
92
+
93
+
94
+
95
+ Traceback (most recent call last):
96
+
97
+ File "/Users/Desktop/program/pro_code/CntWord_csv.py", line 13, in <module>
98
+
99
+ malist = t.tokenize(rows['0'])
100
+
101
+ File "/Users/.pyenv/versions/anaconda3-4.2.0/lib/python3.5/site-packages/pandas/core/series.py", line 583, in __getitem__
102
+
103
+ result = self.index.get_value(self, key)
104
+
105
+ File "/Users/.pyenv/versions/anaconda3-4.2.0/lib/python3.5/site-packages/pandas/indexes/base.py", line 1994, in get_value
106
+
107
+ raise e1
108
+
109
+ File "/Users/.pyenv/versions/anaconda3-4.2.0/lib/python3.5/site-packages/pandas/indexes/base.py", line 1980, in get_value
110
+
75
- ![イメージ説明](33d78ea19fe0a5d884b081055ed0c706.png)
111
+ tz=getattr(series.dtype, 'tz', None))
112
+
113
+ File "pandas/index.pyx", line 103, in pandas.index.IndexEngine.get_value (pandas/index.c:3332)
114
+
115
+ File "pandas/index.pyx", line 111, in pandas.index.IndexEngine.get_value (pandas/index.c:3035)
116
+
117
+ File "pandas/index.pyx", line 159, in pandas.index.IndexEngine.get_loc (pandas/index.c:4018)
118
+
119
+ File "pandas/hashtable.pyx", line 675, in pandas.hashtable.PyObjectHashTable.get_item (pandas/hashtable.c:12368)
120
+
121
+ File "pandas/hashtable.pyx", line 683, in pandas.hashtable.PyObjectHashTable.get_item (pandas/hashtable.c:12322)
122
+
123
+ KeyError: '0'
124
+
125
+
76
126
 
77
127
  宜しくお願い致します。