替换操作
- 替换操作可以同步作用于Series和DataFrame中
- 单值替换
- 普通替换: 替换所有符合要求的元素:to_replace=15,value=‘e‘
- 按列指定单值替换: to_replace={列标签:替换值} value=‘value‘
- 多值替换
- 列表替换: to_replace=[] value=[]
- 字典替换(推荐) to_replace={to_replace:value,to_replace:value}



替换 df.replace()
原文:https://www.cnblogs.com/Teyisang/p/14546017.html