1.7.9 The largest delays
A descending sort puts nulls first, as Python’s does; #:nulls-last moves them to the end. On the full file the five largest delays are 1301, 1137, 1126, 1014 and 1005 minutes.
> (~> flights (sort "dep_delay" #:descending #t) (select "dep_delay") (head 3))
shape: (3, 1)
┌───────────┐
│ dep_delay │
│ --- │
│ i64 │
╞═══════════╡
│ null │
│ null │
│ null │
└───────────┘
> (~> flights (sort "dep_delay" #:descending #t #:nulls-last #t) (select "dep_delay" "carrier" "dest") (head 5))
shape: (5, 3)
┌───────────┬─────────┬──────┐
│ dep_delay ┆ carrier ┆ dest │
│ --- ┆ --- ┆ --- │
│ i64 ┆ str ┆ str │
╞═══════════╪═════════╪══════╡
│ 853 ┆ MQ ┆ BWI │
│ 434 ┆ VX ┆ LAX │
│ 379 ┆ EV ┆ MCI │
│ 368 ┆ AA ┆ DFW │
│ 363 ┆ EV ┆ IAD │
└───────────┴─────────┴──────┘