1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20
| ┌────────────────────────────────────────────────────────────┐ │ NumPy 记忆口诀 │ ├────────────────────────────────────────────────────────────┤ │ 创建记住: array, zeros, ones, arange, linspace │ │ 变形记住: reshape, flatten, transpose (或 .T) │ │ 运算记住: +,-,*,/,@, dot │ │ 统计记住: sum, mean, std, max, min │ │ 索引记住: 切片[:], 布尔[arr>0], 花式[[0,2]] │ └────────────────────────────────────────────────────────────┘
┌────────────────────────────────────────────────────────────┐ │ Pandas 记忆口诀 │ ├────────────────────────────────────────────────────────────┤ │ 读写记住: read_csv/to_csv, read_excel/to_excel │ │ 选择记住: loc[标签], iloc[位置], query('条件') │ │ 清洗记住: dropna, fillna, drop_duplicates, replace │ │ 聚合记住: groupby + agg, pivot_table │ │ 合并记住: concat(拼), merge(连), join(索引) │ │ 时间记住: to_datetime, resample, rolling │ └────────────────────────────────────────────────────────────┘
|