How do you handle missing or corrupt data in a Pandas DataFrame?
Using the provided sensor_readings table, write a SQL query that applies equivalent data-cleaning logic. Treat NULL or blank values as missing, and nonnumeric or negative values as corrupt. Return every input row with a cleaned numeric value when valid and a quality classification.
reading_id, sensor_name, cleaned_value, and data_statusmissing, corrupt, or valid for data_status; return NULL for cleaned_value when not validreading_id ascending| Column | Type | Description |
|---|---|---|
| reading_idPK | INT | Unique sensor reading identifier |
| sensor_name | VARCHAR(50) | Name of the sensor |
| raw_value | VARCHAR(50) | Uncleaned reading value stored as text |
| recorded_at | DATE | Date on which the reading was recorded |