Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- import pandas as pd
- support_log_grouped=pd.read_csv('/datasets/support_log_grouped_eng.csv')
- def alert_group_importance(row):
- alert_group = row['alert_group']
- importance = row['importance']
- if alert_group == 'medium':
- if importance == 1:
- return 'attention'
- if alert_group == 'high':
- if importance == 1:
- return 'high risk'
- if alert_group == 'critical':
- if importance == 1:
- return 'block'
- return 'queued'
- row_values = ['high', 1]
- row_columns = ['alert_group', 'importance']
- row = pd.Series(data=row_values, index=row_columns)
- print(alert_group_importance(row))
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement