Hospital Visits Dataset - Exercise
1. Data Cleaning Exercises
1.1 Detect missing values in all columns.
1.2 Identify which columns contain the highest number of missing values.
1.3 Fill missing values as follows: - patient_age → fill with median - waiting_time_minutes →
fill with mean - diagnosis → fill with "Unknown"
1.4 Detect and remove duplicate rows. How many duplicates were found?
1.5 Convert visit_date to datetime format.
2. Exploratory Analysis (GroupBy)
2.1 Number of visits per department.
2.2 Average visit cost per department.
2.3 Average waiting time per department.
2.4 Total revenue generated by each doctor.
2.5 Count number of visits for each insurance provider.
3. Visualization Exercises
3.1 Bar chart: Number of visits per department.
3.2 Pie chart: Insurance provider distribution.
3.3 Histogram: Distribution of patient ages.
3.4 Boxplot: Waiting time comparison across departments.
4. Advanced Analysis Questions
4.1 Create a scatter plot showing the relationship between patient_age and cost. What can
you conclude?
4.2 Identify which patient spent the most total money.
4.3 Find the top 3 most common diagnoses.
5. Insight Questions
5.1 Which department generates the highest total revenue?
5.2 Which insurance provider is most commonly used?
5.3 Are waiting times higher for male or female patients?