Gross box office measures total ticket revenue before deductions. In genre data, it supports comparisons across films, years, and COVID periods, but its source column may contain threshold values rather than ordinary numbers. section 5.4.3
Use gross box office to:
- Calculate total revenue by genre by grouping rows and summing the gross box office column. section 5.4.3
- Compare genre revenue across individual years rather than relying only on an overall total. section 5.4.3
- Treat values below £100,000 explicitly instead of silently converting them to zero. section 5.4.3
Representing suppressed low revenue
When a row contains “<0.1” million, replace it with 0.05 before converting the column to floating-point values. This preserves a low-revenue signal while making aggregation possible. section 5.4.3
genres.loc[genres["Gross box office (£ million)"] == "<0.1", "Gross box office (£ million)"] = 0.05 genres["Gross box office (£ million)"] = genres["Gross box office (£ million)"].astype(float)
Inspect the executable transformation that replaces “<0.1” and converts gross box office values to numeric data. section 5.4.3
