route1realdir = route1dirapplylambda x inty for y in xsplit-修改:如果route1dir的元素无-则返回原值否则用split-分开
route1["realdir"] = route1['dir'].apply(lambda x: [int(y) for y in x.split('-')] if '-' in x else x)
原文地址: https://www.cveoy.top/t/topic/fGMu 著作权归作者所有。请勿转载和采集!