Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- import pandas as pd
- support_log = pd.read_csv('/datasets/support_log.csv')
- support_log_grouped = support_log.groupby('type_id').count()
- def alert_group(messages):#alert_group(messages) - функция, которая оценивает приоритет в зависимости от количества сообщений
- if messages <= 300:
- return 'средний'
- elif messages <= 500:
- return 'высокий'
- return 'критичный'
- print(alert_group(10))
- print(alert_group(450))
- print(alert_group(1000))
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement