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

質問編集履歴

1

エラー全文掲載しました。

2019/11/17 11:08

投稿

shu214
shu214

スコア18

title CHANGED
File without changes
body CHANGED
@@ -14,6 +14,57 @@
14
14
  ### 発生している問題・エラーメッセージ
15
15
 
16
16
  ```
17
+ ValueError Traceback (most recent call last)
18
+ <ipython-input-5-5e185effa98f> in <module>()
19
+ 18 data.E = data.E.str.split()
20
+ 19
21
+ ---> 20 data = data.astype(np.float)
22
+ 21
23
+ 22 data
24
+
25
+ 5 frames
26
+ /usr/local/lib/python3.6/dist-packages/pandas/core/generic.py in astype(self, dtype, copy, errors, **kwargs)
27
+ 5880 # else, only a single dtype is given
28
+ 5881 new_data = self._data.astype(
29
+ -> 5882 dtype=dtype, copy=copy, errors=errors, **kwargs
30
+ 5883 )
31
+ 5884 return self._constructor(new_data).__finalize__(self)
32
+
33
+ /usr/local/lib/python3.6/dist-packages/pandas/core/internals/managers.py in astype(self, dtype, **kwargs)
34
+ 579
35
+ 580 def astype(self, dtype, **kwargs):
36
+ --> 581 return self.apply("astype", dtype=dtype, **kwargs)
37
+ 582
38
+ 583 def convert(self, **kwargs):
39
+
40
+ /usr/local/lib/python3.6/dist-packages/pandas/core/internals/managers.py in apply(self, f, axes, filter, do_integrity_check, consolidate, **kwargs)
41
+ 436 kwargs[k] = obj.reindex(b_items, axis=axis, copy=align_copy)
42
+ 437
43
+ --> 438 applied = getattr(b, f)(**kwargs)
44
+ 439 result_blocks = _extend_blocks(applied, result_blocks)
45
+ 440
46
+
47
+ /usr/local/lib/python3.6/dist-packages/pandas/core/internals/blocks.py in astype(self, dtype, copy, errors, values, **kwargs)
48
+ 557
49
+ 558 def astype(self, dtype, copy=False, errors="raise", values=None, **kwargs):
50
+ --> 559 return self._astype(dtype, copy=copy, errors=errors, values=values, **kwargs)
51
+ 560
52
+ 561 def _astype(self, dtype, copy=False, errors="raise", values=None, **kwargs):
53
+
54
+ /usr/local/lib/python3.6/dist-packages/pandas/core/internals/blocks.py in _astype(self, dtype, copy, errors, values, **kwargs)
55
+ 641 # _astype_nansafe works fine with 1-d only
56
+ 642 vals1d = values.ravel()
57
+ --> 643 values = astype_nansafe(vals1d, dtype, copy=True, **kwargs)
58
+ 644
59
+ 645 # TODO(extension)
60
+
61
+ /usr/local/lib/python3.6/dist-packages/pandas/core/dtypes/cast.py in astype_nansafe(arr, dtype, copy, skipna)
62
+ 727 if copy or is_object_dtype(arr) or is_object_dtype(dtype):
63
+ 728 # Explicit copy, or required since NumPy can't view from / to object.
64
+ --> 729 return arr.astype(dtype, copy=True)
65
+ 730
66
+ 731 return arr.view(dtype)
67
+
17
68
  ValueError: setting an array element with a sequence.
18
69
  ```
19
70