和apply類似的還有applymap和map,
apply() 和applymap()是DataFrame數(shù)據(jù)類型的函數(shù)链嘀,map()是Series數(shù)據(jù)類型的函數(shù)萌狂。
apply()的操作對象DataFrame的一列或者一行數(shù)據(jù), applymap()是element-wise的管闷,作用于每個DataFrame的每個數(shù)據(jù)粥脚。 map()也是element-wise的窃肠,對Series中的每個數(shù)據(jù)調(diào)用一次函數(shù)包个。?
* apply works on a row / column basis of a DataFrame, applymap works element-wise on a DataFrame, and map works element-wise on a Series.?
更多內(nèi)容:http://pandas.pydata.org/pandas-docs/stable/api.html#id5