質問編集履歴
1
完全なtracebackの更新
title
CHANGED
File without changes
|
body
CHANGED
@@ -14,12 +14,27 @@
|
|
14
14
|
```python
|
15
15
|
if width > splet:
|
16
16
|
print("buy")
|
17
|
-
elif (-splet > width)
|
17
|
+
elif (-splet > width) & (width > splet):
|
18
18
|
print('sell')
|
19
19
|
else:
|
20
20
|
print('none')
|
21
21
|
```
|
22
22
|
次のようなエラーが出ます
|
23
23
|
```python
|
24
|
+
ValueError Traceback (most recent call last)
|
25
|
+
<ipython-input-26-69476cce1849> in <module>()
|
26
|
+
4
|
27
|
+
5
|
28
|
+
----> 6 if width > splet:
|
29
|
+
7 print("buy")
|
30
|
+
8 elif (-splet > width) & (width > splet):
|
31
|
+
|
32
|
+
~\Anaconda3\lib\site-packages\pandas\core\generic.py in __nonzero__(self)
|
33
|
+
1119 raise ValueError("The truth value of a {0} is ambiguous. "
|
34
|
+
1120 "Use a.empty, a.bool(), a.item(), a.any() or a.all()."
|
35
|
+
-> 1121 .format(self.__class__.__name__))
|
36
|
+
1122
|
37
|
+
1123 __bool__ = __nonzero__
|
38
|
+
|
24
39
|
ValueError: The truth value of a Series is ambiguous. Use a.empty, a.bool(), a.item(), a.any() or a.all().
|
25
40
|
```
|