LearnPy Hub
← Exploratory Data Analysis (EDA) problems
Medium

Mostly Empty?

For each column print the percentage of missing values with 1 decimal place, as column: 12.5%. Then print the names of the columns that are more than 40% missing (separated by spaces), or none.

Input

A CSV table: a header line, then one line per row (an empty field means a missing value), then a line END.

Output

One line per column, then one line of column names or none.

Sample 1

Input
name,age,city,score
Mim,21,Dhaka,80
Rafi,,Khulna,
Sara,23,,91
Tuhin,,,
Nadia,22,Dhaka,77
Anik,24,Sylhet,
END
Output
name: 0.0%
age: 33.3%
city: 33.3%
score: 50.0%
score

Sample 2

Input
dept,hours,score
CSE,12,85
EEE,5,52
CSE,,78
BBA,2,31
EEE,7,
END
Output
dept: 0.0%
hours: 20.0%
score: 20.0%
none
solution.py
Output appears here
Hints
Mostly Empty? · Python practice problem · LearnPy Hub