質問編集履歴
1
エラー全文掲載しました。
test
CHANGED
File without changes
|
test
CHANGED
@@ -29,6 +29,108 @@
|
|
29
29
|
|
30
30
|
|
31
31
|
```
|
32
|
+
|
33
|
+
ValueError Traceback (most recent call last)
|
34
|
+
|
35
|
+
<ipython-input-5-5e185effa98f> in <module>()
|
36
|
+
|
37
|
+
18 data.E = data.E.str.split()
|
38
|
+
|
39
|
+
19
|
40
|
+
|
41
|
+
---> 20 data = data.astype(np.float)
|
42
|
+
|
43
|
+
21
|
44
|
+
|
45
|
+
22 data
|
46
|
+
|
47
|
+
|
48
|
+
|
49
|
+
5 frames
|
50
|
+
|
51
|
+
/usr/local/lib/python3.6/dist-packages/pandas/core/generic.py in astype(self, dtype, copy, errors, **kwargs)
|
52
|
+
|
53
|
+
5880 # else, only a single dtype is given
|
54
|
+
|
55
|
+
5881 new_data = self._data.astype(
|
56
|
+
|
57
|
+
-> 5882 dtype=dtype, copy=copy, errors=errors, **kwargs
|
58
|
+
|
59
|
+
5883 )
|
60
|
+
|
61
|
+
5884 return self._constructor(new_data).__finalize__(self)
|
62
|
+
|
63
|
+
|
64
|
+
|
65
|
+
/usr/local/lib/python3.6/dist-packages/pandas/core/internals/managers.py in astype(self, dtype, **kwargs)
|
66
|
+
|
67
|
+
579
|
68
|
+
|
69
|
+
580 def astype(self, dtype, **kwargs):
|
70
|
+
|
71
|
+
--> 581 return self.apply("astype", dtype=dtype, **kwargs)
|
72
|
+
|
73
|
+
582
|
74
|
+
|
75
|
+
583 def convert(self, **kwargs):
|
76
|
+
|
77
|
+
|
78
|
+
|
79
|
+
/usr/local/lib/python3.6/dist-packages/pandas/core/internals/managers.py in apply(self, f, axes, filter, do_integrity_check, consolidate, **kwargs)
|
80
|
+
|
81
|
+
436 kwargs[k] = obj.reindex(b_items, axis=axis, copy=align_copy)
|
82
|
+
|
83
|
+
437
|
84
|
+
|
85
|
+
--> 438 applied = getattr(b, f)(**kwargs)
|
86
|
+
|
87
|
+
439 result_blocks = _extend_blocks(applied, result_blocks)
|
88
|
+
|
89
|
+
440
|
90
|
+
|
91
|
+
|
92
|
+
|
93
|
+
/usr/local/lib/python3.6/dist-packages/pandas/core/internals/blocks.py in astype(self, dtype, copy, errors, values, **kwargs)
|
94
|
+
|
95
|
+
557
|
96
|
+
|
97
|
+
558 def astype(self, dtype, copy=False, errors="raise", values=None, **kwargs):
|
98
|
+
|
99
|
+
--> 559 return self._astype(dtype, copy=copy, errors=errors, values=values, **kwargs)
|
100
|
+
|
101
|
+
560
|
102
|
+
|
103
|
+
561 def _astype(self, dtype, copy=False, errors="raise", values=None, **kwargs):
|
104
|
+
|
105
|
+
|
106
|
+
|
107
|
+
/usr/local/lib/python3.6/dist-packages/pandas/core/internals/blocks.py in _astype(self, dtype, copy, errors, values, **kwargs)
|
108
|
+
|
109
|
+
641 # _astype_nansafe works fine with 1-d only
|
110
|
+
|
111
|
+
642 vals1d = values.ravel()
|
112
|
+
|
113
|
+
--> 643 values = astype_nansafe(vals1d, dtype, copy=True, **kwargs)
|
114
|
+
|
115
|
+
644
|
116
|
+
|
117
|
+
645 # TODO(extension)
|
118
|
+
|
119
|
+
|
120
|
+
|
121
|
+
/usr/local/lib/python3.6/dist-packages/pandas/core/dtypes/cast.py in astype_nansafe(arr, dtype, copy, skipna)
|
122
|
+
|
123
|
+
727 if copy or is_object_dtype(arr) or is_object_dtype(dtype):
|
124
|
+
|
125
|
+
728 # Explicit copy, or required since NumPy can't view from / to object.
|
126
|
+
|
127
|
+
--> 729 return arr.astype(dtype, copy=True)
|
128
|
+
|
129
|
+
730
|
130
|
+
|
131
|
+
731 return arr.view(dtype)
|
132
|
+
|
133
|
+
|
32
134
|
|
33
135
|
ValueError: setting an array element with a sequence.
|
34
136
|
|