如何对在python数据框列的一列中显示的多个列表进行排序?

时间:2019-07-03 18:27:34

标签: python python-3.x

df =(df ['composition_new']。str.split('+')。apply(lambda x:sorted(x,key = lambda y:int(y.split()[0] [1:] ))。str.join('+')) ----我正在使用上面的代码。 the image represent sample data input and output

0 个答案:

没有答案