# -*- encoding:utf-8 -*- ''' @Author : dingjiawen @Date : 2023/5/29 16:18 @Usage : @Desc : 模型训练相关测试 ''' import pandas as pd import numpy as np import json # data = pd.read_csv("G:\data\SCADA数据/jb4q_8_delete_all_zero_simple.csv") # data = data.iloc[:10000,3:13] # data = np.array(data) # print(data) record = '{"num_gen_torque":36.32,"num_gearbox_sumptemp":50.035297,"num_gearbox_inletoiltemp":47.73672,"production":"20000","latitude":"82.46","degree_winddirection":172.95117,"num_envtemp":23.717888,"num_gen_speed":1516.0,"rated_efficiency":"96","rated_load":"26521","num_gearbox_pumpoutletpress":5.004181,"rated_speed":"1731","num_engineroom_temp":32.029892,"num_rotorspeed":11.877784,"num_activepower":678.0,"num_engineroom_vibration_x":0.007827997,"rated_air_volume":"9397","num_engineroom_vibration_y":-0.0063325884,"num_gearbox_highspeedshaft_front_temp":60.51593,"num_gen_max_windingtemp":78.60004,"num_gearbox_highspeedshaft_rear_temp":62.51814,"longitude":"100.65","wt_no":8,"realtime":"2018-07-30 00:00:00","num_windspeed":7.318091,"rated_power":"1090","type_id":"3","rated_press":"16036","num_gearbox_coolingwatertemp":42.06111,"num_gearbox_inletpress":2.621296,"location":"靖边四期","time":"20230529172114","windfarm":"jingbian_siqi"}' jsonData = json.loads(record) data = np.array([jsonData['num_gearbox_sumptemp'], jsonData['num_gearbox_inletoiltemp'], jsonData['num_gearbox_inletpress'], jsonData['num_gearbox_pumpoutletpress'], jsonData['num_gearbox_coolingwatertemp'], jsonData['num_envtemp'], jsonData['num_gearbox_highspeedshaft_front_temp'], jsonData['num_gearbox_highspeedshaft_rear_temp'], jsonData['num_gen_max_windingtemp'], jsonData['num_engineroom_temp']]) print(data) print(data.shape)