You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
# Write a solution to calculate the bonus of each employee. The bonus of an employee is 100% of their salary if the ID of the employee is an odd number and the employee's name does not start with the character 'M'. The bonus of an employee is 0 otherwise.
# Return the result table ordered by employee_id.
import pandas as pd
def calculate_special_bonus(employees):
bonus = []
for i in employees.index:
if employees['employee_id'][i] % 2 != 0 and employees['name'][i][0] != "M":