I'm currently studying pandas and I come from an R/dplyr/tidyverse background.
Pandas has a not-so-intuitive API and how would I elegantly rewrite such operation from dplyr using pandas syntax?
library("nycflights13")
library("tidyverse")
delays <- flights %>%
group_by(dest) %>%
summarize(
count = n(),
dist = mean(distance, na.rm = TRUE),
delay = mean(arr_delay, na.rm = TRUE)
) %>%
filter(count > 20, dest != "HNL")