# Titanic data cleaning and survival report
Create a root `solve.py` that reads the current `titanic.csv`, creates `titanic_clean.csv` and `report.html` in the same directory, and runs offline. Compute results from the input each time; do not hard-code the bundled records or outputs.
## Cleaned data
- Resolve missing age and deck values by reasonable imputation or dropping rows missing one of these fields. Keep all complete rows and do not alter observed ages, decks or other original fields. Filled ages should be finite and within the observed age range. Keep a nonempty dataset with no missing age or deck.
- Keep the original category labels for `embarked` and `class` and add `embarked_code` and `class_code` as nonnegative integers. Within each field, use one distinct, consistent code per category. Pandas is optional; CSV does not carry category dtypes.
- Add boolean `is_alone`, true exactly when `sibsp + parch == 0`.
## Report
Summarize cleaning and the final row count. Compute survivors, total and survival rate separately for each sex category and each class category from the **final cleaned CSV**. In `
`, display the category, counts and rate for each group. For each data row provide `data-group` (`sex` or `class`), `data-category` (original label), `data-survived`, `data-total` and `data-rate` (fraction from 0 to 1).
Include a visible `