Changes:增加了自动生成修改数据变csv的格式
This commit is contained in:
17
step_test.py
17
step_test.py
@@ -1,14 +1,17 @@
|
||||
import pandas as pd
|
||||
from step import step
|
||||
import ray
|
||||
ray.init()
|
||||
|
||||
filepath = "D:/python_project/TurbineExhaustTemperatureTheromcouple-FourWorkingCondition.xlsx"
|
||||
origin_data = pd.read_excel(filepath,sheet_name='s4_ttxd')
|
||||
filepath = "D:/python_project_data/1.csv"
|
||||
origin_data = pd.read_csv(filepath)
|
||||
row_len = origin_data.shape[0]
|
||||
cow_len = origin_data.shape[1]
|
||||
disturb_data = origin_data
|
||||
algorithm_step = step()
|
||||
cow_name = "ttxd_12_1"
|
||||
algorithm_step.set_config('{"STEP_AMPLITUDE_BASE": 1.3}')
|
||||
algorithm_step = step.remote()
|
||||
cow_name = "G1.TTXD1_3"
|
||||
algorithm_step.set_config.remote('{"STEP_AMPLITUDE_BASE": 1.3}')
|
||||
for i in range(0,row_len):
|
||||
disturb_data.loc[i,cow_name]=algorithm_step.eval(origin_data.loc[i,cow_name])
|
||||
print(disturb_data)
|
||||
futures=algorithm_step.eval.remote(origin_data.loc[i,cow_name])
|
||||
disturb_data.loc[i, cow_name] = ray.get(futures)
|
||||
print(disturb_data.loc[:,cow_name])
|
||||
Reference in New Issue
Block a user