我想以表格格式并排显示所有三个列表以及与值关联的名称。我正在手动做它现在和它需要一段时间为所有20个文件,我必须做。谢谢你的帮助!你知道吗
maxpreandpost = [Pre1,Pre2,Pre3,Pre4,Pre5,Pre6,Pre7,Pre8,Pre9,Pre10,Post1,Post2,Post3,Post4,Post5,Post6,Post7,Post8,Post9,Post10]
for i in maxpreandpost:
height = max(i.Z)
print (height)
165.387美元 160.214 159.118 186.685 163.744 160.717 184.026 171.25099999999995 175.73 156.512 150.339 131.528 148.52100000000004 126.738 136.389 148.334 129.855 153.599 144.595 159.3229999995
lenpreandpost = [Pre1,Pre2,Pre3,Pre4,Pre5,Pre6,Pre7,Pre8,Pre9,Pre10,Post1,Post2,Post3,Post4,Post5,Post6,Post7,Post8,Post9,Post10]
for i in lenpreandpost:
duration = len(i.Z)
print (duration)
690个 543 292 271 293 147 209 355 230 293 395 256 349 255 335 255 231 243 315 267个
dis = [Pre1,Pre2,Pre3,Pre4,Pre5,Pre6,Pre7,Pre8,Pre9,Pre10,Post1,Post2,Post3,Post4,Post5,Post6,Post7,Post8,Post9,Post10]
for i in dis:
p1 = [max(i.X),max(i.Y)]
p2 = [min(i.X),min(i.Y)]
distance = math.sqrt(((p1[0]-p2[0])**2)+((p1[1]-p2[1])**2))
print (distance)
2219.0546989150585 2337.434842606099 1857.1832474809803 1450.0472277998394 1512.6539831504758 1058.5635689541748 1653.517987682021 1854.670452561212 1861.8190476064021 1775.672511965326 1872.275393720069 1814.9932559772114 1852.3299779009246 1875.2281201398403 1867.1599096301313 1708.250531327712 1793.8521780715407 1862.7949271803914 1872.843665022548 1800.2239125453254
当然,将所有值附加到输出列表,然后将它们添加到数据帧:
其输出类似于:
相关问题 更多 >
编程相关推荐