>>> df.groupby('filename').apply(lambda group: group.interpolate(method='index')) filename val1 val2t 1 file1.csv 5 102 file1.csv 10 153 file1.csv 15 206 file2.csv NaN NaN7 file2.csv 10 208 file2.csv 12 15
欢迎分享,转载请注明来源:内存溢出
>>> df.groupby('filename').apply(lambda group: group.interpolate(method='index')) filename val1 val2t 1 file1.csv 5 102 file1.csv 10 153 file1.csv 15 206 file2.csv NaN NaN7 file2.csv 10 208 file2.csv 12 15
欢迎分享,转载请注明来源:内存溢出
评论列表(0条)