我该怎么重写
df.apply(pd.Series.interpolate)因此,它可以实现与
df.interpolate(method='nearest')提前谢谢。
发布于 2015-12-24 06:08:31
您可以将一个参数传递给apply
df.apply(pd.Series.interpolate, args=('nearest',))或
df.apply(pd.Series.interpolate, method='nearest')发布于 2015-12-24 05:20:18
您需要提供一个函数,并选择轴(列为0):
df.apply(lambda a: a.interpolate(method='nearest'), axis=0)https://stackoverflow.com/questions/34447564
复制相似问题