- footguns
- type inference when constructing
- .copy() or else transforms are just slices/views that share underlying storage
- creation
- read_csv
- flags: parse_dates
- slicing and dicing
- iloc: by indexes
- loc: supports labels
- query
- sample
- drop
- dropna: drop columns with na’s, can specify thresholds
- summaries
- head
- describe
- quantile
- nlargest
- nsmallest
- df transforms
- rename
- apply: rows
- get_dummies: replace missing values
- concat
- sort_values(by=…)
- drop_duplicates
- groupby
- agg, aggregate: can specify dict of new columns and their agg function(s)
- filter: return same rows but filtered (like SQL OVER + WHERE)
- transform: passed in entire group, e.g. x - x.mean() (like SQL OVER)
- apply: passed in rows (like SQL OVER)
- pivot_table: groupby + unstack (groupby results in multi-index along rows)
- series transforms
- cut: bin continuous values into discrete
- fillna
- isin: for categoricals
- time series
- rolling: sliding window: s.rolling(window=2).agg(…)
- resample: aggregate over windows of 5min, 1ms, 1h, ME=month end, BME=business ME, QE, BQE, W, etc.
- indexes
- set_index
- reset_index
- unstack
- joins
- merge: how you join - inner, outer, left, right, cross
- appends _x and _y for same-name columns
- supports validation
- supports arbitrary grouping: pass in a group key per row
- merge_asof: time-based merge
- plot
- misc: supports styling
- export