我有一个带有转速和效率值的数据框.RPM曲线值不是均匀分布的,并且RPM值是不规则间隔.如何才能使RPM值以规则的间隔出现?以下是我的数据和Python代码:
dict ={'rpm': [363, 362, 361, 360, 359, 358, 357, 356, 357, 354, 357, 356, 354, 351, 350, 349, 348, 347, 346, 345, 344, 342, 340, 339, 338, 337, 334, 332, 330, 329, 327, 325, 324, 321, 319, 317, 316, 313, 310, 308, 299, 288, 275, 265, 256, 247, 239, 230, 220, 209, 207, 200, 191, 182, 172, 164, 156, 148, 141, 135, 128, 121, 111, 110, 91, 98, 87, 74, 79, 76, 68, 50, 51, 50, 51, 41, 24, 0], 'eff': [30.0, 44.7, 55.0, 65.5, 71.85, 75.8, 79.05, 82.25, 81.0, 87.7, 85.8, 87.2, 87.0, 89.0, 88.2, 88.4, 89.0, 90.8, 89.6, 89.3, 89.6, 89.56666666666668, 89.8, 87.9, 89.2, 90.7, 88.0, 88.3, 88.6, 89.4, 87.2, 86.7, 85.6, 85.4, 85.3, 85.4, 85.1, 86.0, 84.5, 83.8, 82.9, 81.8, 80.7, 79.6, 78.8, 77.8, 77.0, 75.9, 74.7, 73.5, 73.2, 72.2, 70.6, 69.1, 67.4, 65.9, 64.2, 62.4, 60.7, 59.1, 57.2, 55.5, 52.0, 51.8, 44.6, 48.1, 43.8, 39.0, 41.4, 40.3, 36.8, 28.4, 29.1, 28.1, 28.9, 23.7, 1.6, 0.0]}
df = pd.DataFrame(dict)
in rpm columns the difference between every two adjacent values is sometime 1 sometimes 0 sometimes more than 1 how to make them equally distributed so that difference between any two adjacent values is 2 something the rpm values has to be 363,360,357,354,............,9,6,3 and I want to get to know for every rpm value what is the efficiency how to do it I used interpolation but the curve points are not equally distributed kindly help me through it thanks in advance