我已经将文件排序到不同的高度。现在,通过for循环进行排序确实很慢。有没有很好的方法做到这一点:
TKE=pd.DataFrame()
for high_value in range(minimum_range_m, maximum_range_m+display_resolution_m,display_resolution_m):
globals()['data_high_sort_%s'%high_value]=pd.DataFrame()
globals()['TKE_%s'%high_value]=pd.DataFrame()
print('Sort height: ', high_value)
for ind_dataframe in range(len(data_month)):
if data_month.iloc[ind_dataframe]['Altitude_[m]']== high_value:
globals()['data_high_sort_%s'%high_value] = globals()['data_high_sort_%s'%high_value].append(data_month.iloc[ind_dataframe][:]) #,ignore_index=True
gc.collect()