Dataford
Interview QuestionsInterview GuidesExperiencesMock InterviewsPricing
Get started

Filter High Severity CSV Alerts

EasyPython00:00
I
Practice interviewer
Your interviewer
In session
I
Interviewer

Welcome to the Python screen.

The question is on your right: Filter High Severity CSV Alerts. Read through the requirements first.

Run and submit your code as often as you need. You also have five interviewer messages this session - want to talk through your approach, or are you ready to start coding?

You need to log in / sign up to run or submit.

Problem

Given a CSV-formatted string csv_text representing network alerts, return a list of alert IDs whose severity is high. The first line is the header and includes at least the columns alert_id and severity. Ignore rows with missing required fields, and match severity case-insensitively.

Constraints

  • 1 <= number of lines <= 10^4
  • Each row is comma-separated and the first row is a header
  • Header contains alert_id and severity
  • Comparison for severity must be case-insensitive

Function Signature

def filter_high_severity_alerts(csv_text):
Your solutionPython 3
You need to log in / sign up to run or submit.
Run your code to see test output