Read sensor readings (sensor_id,district,timestamp,pm25) from standard input and print a quality report:
rows read: 9
exact duplicate rows: 1
missing pm25: 1
unparseable timestamps: 1
out-of-range pm25 (<0 or >1000): 2
rows kept: 4 of 9 (44%)
mean pm25 by district: Longwan 20.0, Lucheng 46.0, Ouhai 30.0
Order: drop exact duplicates first; then count missing PM2.5; parse timestamps with errors="coerce" and count failures; count out-of-range values; normalize district names with str.strip().str.title(); keep rows with 0 ≤ pm25 ≤ 1000 and a valid timestamp. The percentage uses the original row count (format :.0%); means are rounded to 1 decimal, districts in alphabetical order.