Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- if df['a'] > 0:
- df['c'] = df['a']
- if df['b'] > 0:
- df['c'] = min(df['a'],df['b'])
- ---------------------------------------------------------------------------
- ValueError Traceback (most recent call last)
- <ipython-input-17-00945ffeddda> in <module>()
- ----> 1 if df['a'] > 0:
- 2 df['c'] = df['a']
- 3 if df['b'] > 0:
- 4 df['c'] = min(df['a'],df['b'])
- /opt/python/python35/lib/python3.5/site-packages/pandas/core/generic.py in __nonzero__(self)
- 1574 raise ValueError("The truth value of a {0} is ambiguous. "
- 1575 "Use a.empty, a.bool(), a.item(), a.any() or a.all()."
- -> 1576 .format(self.__class__.__name__))
- 1577
- 1578 __bool__ = __nonzero__
- ValueError: The truth value of a Series is ambiguous. Use a.empty, a.bool(), a.item(), a.any() or a.all().
Add Comment
Please, Sign In to add comment