Field note · April 24, 2024
Reading fare_usd before trusting it in ride-hail-trips
8,000 rows, 3,430 distinct values, and the one fact about fare_usd that changes how you query it.
Profiling fare_usd on ride-hail-trips before anyone builds anything on top of it.
8,000 rows, no nulls, 3,430 distinct values. Base fare before tip, after surge.
The five-number version: min 3.02, p10 7.80, median 14.29, p90 44.54, max 270.61. The mean is 22.16.
The p10 to p90 band — 7.80 to 44.54 — is where ordinary rows live, and it is the pair worth quoting when somebody asks what to expect. Min and max describe the two strangest rows in the table and nothing else; they are useful for spotting impossible values and misleading for everything else.
select
count(*) as rows,
count(fare_usd) as present,
count(*) - count(fare_usd) as nulls,
count(distinct fare_usd) as distinct_values
from ride_hail_trips;The mean sits 55% above the median, which is the whole story: anything that reports the average of fare_usd is reporting a number most rows are below. Put the median next to it or drop the mean.
Where this bites: a filter like fare_usd > 22.16 reads as "above average" and selects a minority of rows — a smaller minority than the phrase suggests to whoever asked for it. If the request was "the typical ones", the threshold they meant was 14.29.
The grain is one row per completed trip, which is the context every one of those numbers depends on. None of them survive a change of grain, which is why "profile the column" and "profile the table" are the same job. Full schema, and the CSV, on the dataset page.