待完成

  • 示例引入

map applymap apply

  • map apply都是对series操作
    • map只能操作 len count 基础函数
    • apply 能传入自定义函数 以axis=1或者0分别按一个series操作
  • applymap 对DataFrame的地图炮
    • applymap对所有元素统一操作

str + apply

  • pandas对象带的对字符串函数
  • apply自定义处理字符串函数

sort

  • sort_values
    • by 哪一列
    • key + lambda 对值处理后的排序
      • Apply the key function to the values before sorting. This is similar to the key argument in the builtin sorted() function, with the notable difference that this key function should be vectorized. It should expect a Series and return a Series with the same shape as the input. It will be applied to each column in by independently.

groupby + apply

  • groupby 分组,返回一个group对象 配合apply使用
  • transform 分组处理返回值,并保持表格不变

拼接

  • merge
  • join
    • how= inner left right outer
  • cat