Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- salary = employees['Salary']
- if Salary > 50000:
- print('Over £50,000')
- else:
- print('Under £50,000')
- def SalaryCheck():
- if Salary > 50000:
- print('Over £50,000')
- else:
- print('Under £50,000')
- employees.Salary.apply(SalaryCheck)
- Traceback (most recent call last):
- File "<input>", line 1, in <module>
- File "C:UsersPeterPycharmProjectsuntitledvenvlibsite- packagespandascoregeneric.py", line 1556, in __nonzero__
- self.__class__.__name__
- ValueError: The truth value of a Series is ambiguous. Use a.empty, a.bool(), a.item(), a.any() or a.all().
- Traceback (most recent call last):
- File "<input>", line 1, in <module>
- File "C:UsersPeterPycharmProjectsuntitledvenvlibsite- packagespandascoreseries.py", line 4038, in apply
- mapped = lib.map_infer(values, f, convert=convert_dtype)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement