pandas——pipe

 

 

 

import pandas as pd
def adder(el1,el2):
    return el1+el2
def delte(args):
    return args+"+delte"
s1 = pd.Series([1,2,3])
s1 = s1.pipe(adder,3)
print(s1)
s2 = pd.Series(["shun1","shun2","shun3"])
s2 = s2.pipe(delte)
print(s2)

 

posted @ 2021-03-21 16:42  朵朵奇fa  阅读(71)  评论(0编辑  收藏  举报