当前位置: 首页>编程语言>正文

python 面向对象 建议可以将某个函数命名为main吗

date = pd.Timestamp.today().date()
res = pd.Timestamp(f"{date} 8:0")

pandas.Timestamp.today

Return the current time in the local timezone.

This differs from datetime.today() in that it can be localized to a passed timezone. 也就是说datetime.today()不能传递tz

pandas.Timestamp.now

Return new Timestamp object representing current time local to tz.

print(pd.to_datetime("now"))
print(pd.to_datetime("today"))
print(pd.Timestamp("now"))
print(pd.Timestamp("today"))
print((pd.Timestamp.today()))
print((pd.Timestamp.now()))
output = {'result': [{'CoolWay': '自然冷却', 'FinishTime': '2024-04-23T06:33:00', 'NewCoilNumber': '34044406', 'RATemp': 361.0, 'pred_temp': 36.8879345272, 'pred_time': '2024-04-25T01:06:06', 'target_time': '2024-04-25T16:00:00'}, {'CoolWay': '自然冷却', 'FinishTime': '2024-04-24T19:32:00', 'NewCoilNumber': '34044334', 'RATemp': 352.0, 'pred_temp': 121.1611709114, 'pred_time': '2024-04-26T16:42:04', 'target_time': '2024-04-25T16:00:00'}, {'CoolWay': '自然冷却', 'FinishTime': '2024-03-16T17:12:00', 'NewCoilNumber': '34022361', 'RATemp': 395.0, 'pred_temp': 29.3584824474, 'pred_time': '2024-03-18T18:55:54', 'target_time': '2024-04-25T16:00:00'}, {'CoolWay': '单4风机', 'FinishTime': '2024-03-15T09:33:00', 'NewCoilNumber': '82403101', 'RATemp': 450.0, 'pred_temp': 29.1905458123, 'pred_time': '2024-03-17T00:38:22', 'target_time': '2024-04-25T16:00:00'}, {'CoolWay': '自然冷却', 'FinishTime': '2024-04-24T23:49:00', 'NewCoilNumber': '24042067', 'RATemp': 397.5, 'pred_temp': 133.2081915551, 'pred_time': '2024-04-26T13:30:35', 'target_time': '2024-04-25T16:00:00'}, {'CoolWay': '单4风机', 'FinishTime': '2024-04-23T00:43:00', 'NewCoilNumber': '34034555', 'RATemp': 351.6, 'pred_temp': 29.5967193996, 'pred_time': '2024-04-24T06:23:12', 'target_time': '2024-04-25T16:00:00'}, {'CoolWay': '单4风机', 'FinishTime': '2024-04-24T10:21:00', 'NewCoilNumber': '24044505', 'RATemp': 352.0, 'pred_temp': 56.9072889648, 'pred_time': '2024-04-25T19:27:47', 'target_time': '2024-04-25T16:00:00'}, {'CoolWay': '自然冷却', 'FinishTime': '2024-04-24T23:49:00', 'NewCoilNumber': '24042065', 'RATemp': 397.5, 'pred_temp': 131.2249652532, 'pred_time': '2024-04-26T12:55:59', 'target_time': '2024-04-25T16:00:00'}, {'CoolWay': '单4风机', 'FinishTime': '2024-04-24T10:43:00', 'NewCoilNumber': '24044476', 'RATemp': 365.0, 'pred_temp': 53.8499767718, 'pred_time': '2024-04-25T17:55:38', 'target_time': '2024-04-25T16:00:00'}, {'CoolWay': '自然冷却', 'FinishTime': '2024-04-24T19:32:00', 'NewCoilNumber': '34044344', 'RATemp': 351.2, 'pred_temp': 121.8786277235, 'pred_time': '2024-04-26T17:02:06', 'target_time': '2024-04-25T16:00:00'}, {'CoolWay': '自然冷却', 'FinishTime': '2024-04-23T21:51:00', 'NewCoilNumber': '24044282', 'RATemp': 398.0, 'pred_temp': 45.0413133471, 'pred_time': '2024-04-25T12:20:36', 'target_time': '2024-04-25T16:00:00'}, {'CoolWay': '自然冷却', 'FinishTime': '2024-04-24T00:15:00', 'NewCoilNumber': '82404031', 'RATemp': 450.0, 'pred_temp': 86.1071084825, 'pred_time': '2024-04-26T11:54:48', 'target_time': '2024-04-25T16:00:00'}, {'CoolWay': '自然冷却', 'FinishTime': '2024-04-24T03:50:00', 'NewCoilNumber': '24032606', 'RATemp': 341.6, 'pred_temp': 56.7613275148, 'pred_time': '2024-04-25T20:13:59', 'target_time': '2024-04-25T16:00:00'}, {'CoolWay': '单4风机', 'FinishTime': '2024-04-24T10:41:00', 'NewCoilNumber': '34044435', 'RATemp': 398.0, 'pred_temp': 53.5535974239, 'pred_time': '2024-04-25T17:43:13', 'target_time': '2024-04-25T16:00:00'}, {'CoolWay': '单4风机', 'FinishTime': '2024-04-23T07:55:00', 'NewCoilNumber': '34044313', 'RATemp': 350.0, 'pred_temp': 31.3657276677, 'pred_time': '2024-04-24T15:28:26', 'target_time': '2024-04-25T16:00:00'}, {'CoolWay': '单4风机', 'FinishTime': '2024-04-24T10:41:00', 'NewCoilNumber': '34044436', 'RATemp': 398.0, 'pred_temp': 53.8055632241, 'pred_time': '2024-04-25T17:50:22', 'target_time': '2024-04-25T16:00:00'}, {'CoolWay': '单4风机', 'FinishTime': '2024-03-15T09:33:00', 'NewCoilNumber': '82403111', 'RATemp': 450.0, 'pred_temp': 29.1873414346, 'pred_time': '2024-03-17T00:25:53', 'target_time': '2024-04-25T16:00:00'}, {'CoolWay': '单4风机', 'FinishTime': '2024-04-24T14:46:00', 'NewCoilNumber': '24044481', 'RATemp': 395.0, 'pred_temp': 67.4195861828, 'pred_time': '2024-04-25T22:56:11', 'target_time': '2024-04-25T16:00:00'}, {'CoolWay': '自然冷却', 'FinishTime': '2024-04-23T21:57:00', 'NewCoilNumber': '24044235-2', 'RATemp': 360.0, 'pred_temp': 34.333665671, 'pred_time': '2024-04-25T01:57:06', 'target_time': '2024-04-25T16:00:00'}, {'CoolWay': '单4风机', 'FinishTime': '2024-04-23T00:43:00', 'NewCoilNumber': '24042111', 'RATemp': 351.6, 'pred_temp': 29.6914709181, 'pred_time': '2024-04-24T06:50:01', 'target_time': '2024-04-25T16:00:00'}, {'CoolWay': '自然冷却', 'FinishTime': '2024-04-23T21:51:00', 'NewCoilNumber': '24044283', 'RATemp': 398.0, 'pred_temp': 43.768873431, 'pred_time': '2024-04-25T11:20:45', 'target_time': '2024-04-25T16:00:00'}, {'CoolWay': '单4风机', 'FinishTime': '2024-04-24T01:27:00', 'NewCoilNumber': '24044273', 'RATemp': 360.0, 'pred_temp': 36.003928086, 'pred_time': '2024-04-25T05:02:04', 'target_time': '2024-04-25T16:00:00'}, {'CoolWay': '自然冷却', 'FinishTime': '2024-04-24T19:32:00', 'NewCoilNumber': '34044343', 'RATemp': 352.0, 'pred_temp': 120.2028319795, 'pred_time': '2024-04-26T16:19:25', 'target_time': '2024-04-25T16:00:00'}, {'CoolWay': '单4风机', 'FinishTime': '2024-04-23T11:35:00', 'NewCoilNumber': '34042386-1', 'RATemp': 283.0, 'pred_temp': 29.8234252489, 'pred_time': '2024-04-24T11:33:48', 'target_time': '2024-04-25T16:00:00'}, {'CoolWay': '单4风机', 'FinishTime': '2024-04-24T07:50:00', 'NewCoilNumber': '24044207', 'RATemp': 354.0, 'pred_temp': 41.3384003615, 'pred_time': '2024-04-25T10:40:51', 'target_time': '2024-04-25T16:00:00'}, {'CoolWay': '单4风机', 'FinishTime': '2024-04-23T06:38:00', 'NewCoilNumber': '24044286', 'RATemp': 350.6, 'pred_temp': 30.2352369463, 'pred_time': '2024-04-24T11:46:40', 'target_time': '2024-04-25T16:00:00'}, {'CoolWay': '单4风机', 'FinishTime': '2024-04-24T18:35:00', 'NewCoilNumber': '24044501', 'RATemp': 362.0, 'pred_temp': 81.861909118, 'pred_time': '2024-04-26T02:59:54', 'target_time': '2024-04-25T16:00:00'}, {'CoolWay': '单4风机', 'FinishTime': '2024-04-23T11:58:00', 'NewCoilNumber': '34044451', 'RATemp': 395.0, 'pred_temp': 31.8911833104, 'pred_time': '2024-04-24T18:51:19', 'target_time': '2024-04-25T16:00:00'}, {'CoolWay': '单4风机', 'FinishTime': '2024-04-24T01:27:00', 'NewCoilNumber': '24044232', 'RATemp': 360.0, 'pred_temp': 36.0320440865, 'pred_time': '2024-04-25T05:03:46', 'target_time': '2024-04-25T16:00:00'}, {'CoolWay': '单4风机', 'FinishTime': '2024-04-24T05:46:00', 'NewCoilNumber': '34044146-2', 'RATemp': 330.0, 'pred_temp': 31.7835211342, 'pred_time': '2024-04-25T01:08:45', 'target_time': '2024-04-25T16:00:00'}, {'CoolWay': '单4风机', 'FinishTime': '2024-04-24T16:54:00', 'NewCoilNumber': '24044471', 'RATemp': 395.0, 'pred_temp': 73.4219430765, 'pred_time': '2024-04-26T00:29:35', 'target_time': '2024-04-25T16:00:00'}, {'CoolWay': '单4风机', 'FinishTime': '2024-04-24T10:41:00', 'NewCoilNumber': '34044437', 'RATemp': 398.0, 'pred_temp': 53.8614605163, 'pred_time': '2024-04-25T17:51:57', 'target_time': '2024-04-25T16:00:00'}, {'CoolWay': '单4风机', 'FinishTime': '2024-04-23T10:05:00', 'NewCoilNumber': '24044373', 'RATemp': 350.0, 'pred_temp': 32.3586047542, 'pred_time': '2024-04-24T18:51:11', 'target_time': '2024-04-25T16:00:00'}, {'CoolWay': '单4风机', 'FinishTime': '2024-04-24T17:53:00', 'NewCoilNumber': '24032581', 'RATemp': 340.0, 'pred_temp': 70.296098533, 'pred_time': '2024-04-25T23:40:27', 'target_time': '2024-04-25T16:00:00'}, {'CoolWay': '大风机+单4', 'FinishTime': '2024-04-24T07:21:00', 'NewCoilNumber': '24042171', 'RATemp': 336.0, 'pred_temp': 37.6259160095, 'pred_time': '2024-04-25T07:51:40', 'target_time': '2024-04-25T16:00:00'}, {'CoolWay': '自然冷却', 'FinishTime': '2024-04-24T05:15:00', 'NewCoilNumber': '34042106', 'RATemp': 397.1, 'pred_temp': 63.2135452256, 'pred_time': '2024-04-25T23:08:42', 'target_time': '2024-04-25T16:00:00'}, {'CoolWay': '单4风机', 'FinishTime': '2024-04-23T15:36:00', 'NewCoilNumber': '34044333', 'RATemp': 353.0, 'pred_temp': 34.4409498982, 'pred_time': '2024-04-25T00:06:28', 'target_time': '2024-04-25T16:00:00'}, {'CoolWay': '自然冷却', 'FinishTime': '2024-04-23T06:33:00', 'NewCoilNumber': '34044407', 'RATemp': 361.0, 'pred_temp': 36.9920444728, 'pred_time': '2024-04-25T01:14:52', 'target_time': '2024-04-25T16:00:00'}, {'CoolWay': '自然冷却', 'FinishTime': '2024-04-24T02:07:00', 'NewCoilNumber': '34032406', 'RATemp': 385.0, 'pred_temp': 46.1819383042, 'pred_time': '2024-04-25T13:30:22', 'target_time': '2024-04-25T16:00:00'}, {'CoolWay': '自然冷却', 'FinishTime': '2024-04-24T00:25:00', 'NewCoilNumber': '24044206', 'RATemp': 353.8, 'pred_temp': 45.7733479312, 'pred_time': '2024-04-25T12:59:44', 'target_time': '2024-04-25T16:00:00'}, {'CoolWay': '自然冷却', 'FinishTime': '2024-04-24T05:15:00', 'NewCoilNumber': '34042107', 'RATemp': 397.1, 'pred_temp': 63.856503986, 'pred_time': '2024-04-25T23:28:35', 'target_time': '2024-04-25T16:00:00'}, {'CoolWay': '自然冷却', 'FinishTime': '2024-04-23T01:10:00', 'NewCoilNumber': '24032901-1', 'RATemp': 411.0, 'pred_temp': 29.2581031355, 'pred_time': '2024-04-24T05:45:34', 'target_time': '2024-04-25T16:00:00'}, {'CoolWay': '单4风机', 'FinishTime': '2024-04-06T04:04:00', 'NewCoilNumber': '82403243', 'RATemp': 450.0, 'pred_temp': 29.1744353664, 'pred_time': '2024-04-07T16:35:37', 'target_time': '2024-04-25T16:00:00'}, {'CoolWay': '单4风机', 'FinishTime': '2024-04-23T10:05:00', 'NewCoilNumber': '24044375', 'RATemp': 350.0, 'pred_temp': 32.7034143704, 'pred_time': '2024-04-24T19:31:08', 'target_time': '2024-04-25T16:00:00'}, {'CoolWay': '单4风机', 'FinishTime': '2024-04-23T00:43:00', 'NewCoilNumber': '24042112', 'RATemp': 351.6, 'pred_temp': 29.6935914294, 'pred_time': '2024-04-24T06:50:36', 'target_time': '2024-04-25T16:00:00'}, {'CoolWay': '自然冷却', 'FinishTime': '2024-04-06T07:51:00', 'NewCoilNumber': '82403251', 'RATemp': 451.0, 'pred_temp': 29.3339486297, 'pred_time': '2024-04-08T10:57:18', 'target_time': '2024-04-25T16:00:00'}, {'CoolWay': '自然冷却', 'FinishTime': '2024-04-23T02:45:00', 'NewCoilNumber': '34032391-1', 'RATemp': 385.0, 'pred_temp': 28.9027791927, 'pred_time': '2024-04-23T17:00:34', 'target_time': '2024-04-25T16:00:00'}, {'CoolWay': '单4风机', 'FinishTime': '2024-04-24T10:43:00', 'NewCoilNumber': '24044417', 'RATemp': 365.0, 'pred_temp': 54.3454435119, 'pred_time': '2024-04-25T18:10:11', 'target_time': '2024-04-25T16:00:00'}, {'CoolWay': '自然冷却', 'FinishTime': '2024-04-24T02:00:00', 'NewCoilNumber': '34042036', 'RATemp': 307.7, 'pred_temp': 63.5023660497, 'pred_time': '2024-04-26T00:57:48', 'target_time': '2024-04-25T16:00:00'}, {'CoolWay': '双4风机', 'FinishTime': '2024-04-23T06:38:00', 'NewCoilNumber': '24044391', 'RATemp': 350.6, 'pred_temp': 29.0212912581, 'pred_time': '2024-04-24T06:01:01', 'target_time': '2024-04-25T16:00:00'}, {'CoolWay': '单4风机', 'FinishTime': '2024-04-24T04:15:00', 'NewCoilNumber': '24044276', 'RATemp': 360.0, 'pred_temp': 38.3311944908, 'pred_time': '2024-04-25T07:54:09', 'target_time': '2024-04-25T16:00:00'}, {'CoolWay': '单4风机', 'FinishTime': '2024-04-23T07:55:00', 'NewCoilNumber': '24044341', 'RATemp': 350.0, 'pred_temp': 32.1722471063, 'pred_time': '2024-04-24T17:19:29', 'target_time': '2024-04-25T16:00:00'}, {'CoolWay': '单4风机', 'FinishTime': '2024-04-24T10:21:00', 'NewCoilNumber': '24044507', 'RATemp': 352.0, 'pred_temp': 56.8367399571, 'pred_time': '2024-04-25T19:25:43', 'target_time': '2024-04-25T16:00:00'}, {'CoolWay': '自然冷却', 'FinishTime': '2024-04-23T21:51:00', 'NewCoilNumber': '24044285', 'RATemp': 398.0, 'pred_temp': 44.6458000778, 'pred_time': '2024-04-25T12:02:11', 'target_time': '2024-04-25T16:00:00'}, {'CoolWay': '单4风机', 'FinishTime': '2024-04-24T14:46:00', 'NewCoilNumber': '24044475', 'RATemp': 395.0, 'pred_temp': 65.9150597241, 'pred_time': '2024-04-25T22:21:52', 'target_time': '2024-04-25T16:00:00'}, {'CoolWay': '单4风机', 'FinishTime': '2024-04-24T18:35:00', 'NewCoilNumber': '24044503', 'RATemp': 362.0, 'pred_temp': 83.9119949639, 'pred_time': '2024-04-26T03:41:38', 'target_time': '2024-04-25T16:00:00'}, {'CoolWay': '单4风机', 'FinishTime': '2024-04-23T18:11:00', 'NewCoilNumber': '24042163', 'RATemp': 294.0, 'pred_temp': 37.1337672387, 'pred_time': '2024-04-25T03:40:17', 'target_time': '2024-04-25T16:00:00'}, {'CoolWay': '单4风机', 'FinishTime': '2024-04-23T15:36:00', 'NewCoilNumber': '34044341', 'RATemp': 353.0, 'pred_temp': 34.3350113579, 'pred_time': '2024-04-24T23:57:22', 'target_time': '2024-04-25T16:00:00'}, {'CoolWay': '单4风机', 'FinishTime': '2024-04-24T01:27:00', 'NewCoilNumber': '24044231', 'RATemp': 360.0, 'pred_temp': 35.8214895963, 'pred_time': '2024-04-25T04:50:55', 'target_time': '2024-04-25T16:00:00'}, {'CoolWay': '单4风机', 'FinishTime': '2024-04-23T11:58:00', 'NewCoilNumber': '34044452', 'RATemp': 395.0, 'pred_temp': 31.9158110231, 'pred_time': '2024-04-24T18:54:24', 'target_time': '2024-04-25T16:00:00'}, {'CoolWay': '单4风机', 'FinishTime': '2024-04-24T10:21:00', 'NewCoilNumber': '24044506', 'RATemp': 352.0, 'pred_temp': 56.7190181349, 'pred_time': '2024-04-25T19:22:16', 'target_time': '2024-04-25T16:00:00'}, {'CoolWay': '自然冷却', 'FinishTime': '2024-04-24T00:15:00', 'NewCoilNumber': '82404041', 'RATemp': 450.0, 'pred_temp': 85.9478345232, 'pred_time': '2024-04-26T11:49:47', 'target_time': '2024-04-25T16:00:00'}, {'CoolWay': '单4风机', 'FinishTime': '2024-04-23T10:11:00', 'NewCoilNumber': '24042153', 'RATemp': 304.0, 'pred_temp': 34.331452069, 'pred_time': '2024-04-24T21:38:28', 'target_time': '2024-04-25T16:00:00'}, {'CoolWay': '单4风机', 'FinishTime': '2024-04-24T04:15:00', 'NewCoilNumber': '24044271', 'RATemp': 360.0, 'pred_temp': 38.3486012085, 'pred_time': '2024-04-25T07:55:01', 'target_time': '2024-04-25T16:00:00'}, {'CoolWay': '单4风机', 'FinishTime': '2024-04-23T15:36:00', 'NewCoilNumber': '34044331', 'RATemp': 353.0, 'pred_temp': 35.2482398695, 'pred_time': '2024-04-25T01:13:13', 'target_time': '2024-04-25T16:00:00'}, {'CoolWay': '单4风机', 'FinishTime': '2024-04-23T07:57:00', 'NewCoilNumber': '34033396', 'RATemp': 360.0, 'pred_temp': 32.3406775117, 'pred_time': '2024-04-24T17:49:25', 'target_time': '2024-04-25T16:00:00'}, {'CoolWay': '自然冷却', 'FinishTime': '2024-04-24T21:04:00', 'NewCoilNumber': '34042311', 'RATemp': 342.6, 'pred_temp': 141.8636215638, 'pred_time': '2024-04-26T23:11:44', 'target_time': '2024-04-25T16:00:00'}, {'CoolWay': '单4风机', 'FinishTime': '2024-04-23T18:44:00', 'NewCoilNumber': '34044133', 'RATemp': 398.0, 'pred_temp': 36.1847912447, 'pred_time': '2024-04-25T03:39:35', 'target_time': '2024-04-25T16:00:00'}, {'CoolWay': '单4风机', 'FinishTime': '2024-04-23T06:38:00', 'NewCoilNumber': '24044287', 'RATemp': 350.6, 'pred_temp': 30.3445809111, 'pred_time': '2024-04-24T12:08:52', 'target_time': '2024-04-25T16:00:00'}, {'CoolWay': '单4风机', 'FinishTime': '2024-04-23T16:07:00', 'NewCoilNumber': '24044233', 'RATemp': 325.0, 'pred_temp': 31.6053100865, 'pred_time': '2024-04-24T19:22:21', 'target_time': '2024-04-25T16:00:00'}, {'CoolWay': '自然冷却', 'FinishTime': '2024-04-23T22:40:00', 'NewCoilNumber': '34044332-2', 'RATemp': 398.2, 'pred_temp': 32.6913846471, 'pred_time': '2024-04-25T00:25:21', 'target_time': '2024-04-25T16:00:00'}, {'CoolWay': '单4风机', 'FinishTime': '2024-04-23T07:57:00', 'NewCoilNumber': '34033393', 'RATemp': 360.0, 'pred_temp': 32.2294982518, 'pred_time': '2024-04-24T17:35:25', 'target_time': '2024-04-25T16:00:00'}, {'CoolWay': '自然冷却', 'FinishTime': '2024-04-24T19:32:00', 'NewCoilNumber': '34044342', 'RATemp': 352.0, 'pred_temp': 121.7418363146, 'pred_time': '2024-04-26T16:55:52', 'target_time': '2024-04-25T16:00:00'}, {'CoolWay': '自然冷却', 'FinishTime': '2024-04-24T21:04:00', 'NewCoilNumber': '34042313', 'RATemp': 342.6, 'pred_temp': 142.0341391686, 'pred_time': '2024-04-26T23:16:11', 'target_time': '2024-04-25T16:00:00'}, {'CoolWay': '单4风机', 'FinishTime': '2024-04-24T13:03:00', 'NewCoilNumber': '24032961-2', 'RATemp': 398.0, 'pred_temp': 42.7438431774, 'pred_time': '2024-04-25T12:32:37', 'target_time': '2024-04-25T16:00:00'}, {'CoolWay': '单4风机', 'FinishTime': '2024-04-24T13:03:00', 'NewCoilNumber': '34042083-2', 'RATemp': 398.0, 'pred_temp': 45.0593208343, 'pred_time': '2024-04-25T13:42:13', 'target_time': '2024-04-25T16:00:00'}, {'CoolWay': '单4风机', 'FinishTime': '2024-04-23T10:32:00', 'NewCoilNumber': '34042367-1', 'RATemp': 261.0, 'pred_temp': 28.9294723893, 'pred_time': '2024-04-23T23:54:49', 'target_time': '2024-04-25T16:00:00'}, {'CoolWay': '单4风机', 'FinishTime': '2024-04-24T10:43:00', 'NewCoilNumber': '24044482', 'RATemp': 365.0, 'pred_temp': 53.601009961, 'pred_time': '2024-04-25T17:48:18', 'target_time': '2024-04-25T16:00:00'}, {'CoolWay': '自然冷却', 'FinishTime': '2024-04-23T04:40:00', 'NewCoilNumber': '24034067', 'RATemp': 360.0, 'pred_temp': 32.4866421405, 'pred_time': '2024-04-24T17:00:43', 'target_time': '2024-04-25T16:00:00'}, {'CoolWay': '单4风机', 'FinishTime': '2024-04-23T12:34:00', 'NewCoilNumber': '24042202', 'RATemp': 410.0, 'pred_temp': 39.9763467968, 'pred_time': '2024-04-25T06:37:23', 'target_time': '2024-04-25T16:00:00'}, {'CoolWay': '单4风机', 'FinishTime': '2024-04-24T19:44:00', 'NewCoilNumber': '24044372-1', 'RATemp': 350.0, 'pred_temp': 43.4852853663, 'pred_time': '2024-04-25T13:29:42', 'target_time': '2024-04-25T16:00:00'}, {'CoolWay': '自然冷却', 'FinishTime': '2024-04-23T22:40:00', 'NewCoilNumber': '24044372-2', 'RATemp': 398.2, 'pred_temp': 37.2800633399, 'pred_time': '2024-04-25T05:50:12', 'target_time': '2024-04-25T16:00:00'}, {'CoolWay': '单4风机', 'FinishTime': '2024-04-23T07:55:00', 'NewCoilNumber': '34044314', 'RATemp': 350.0, 'pred_temp': 31.433558431, 'pred_time': '2024-04-24T15:38:26', 'target_time': '2024-04-25T16:00:00'}, {'CoolWay': '单4风机', 'FinishTime': '2024-04-23T16:07:00', 'NewCoilNumber': '24044266', 'RATemp': 325.0, 'pred_temp': 31.6376236597, 'pred_time': '2024-04-24T19:26:17', 'target_time': '2024-04-25T16:00:00'}, {'CoolWay': '自然冷却', 'FinishTime': '2024-04-24T00:25:00', 'NewCoilNumber': '24044396', 'RATemp': 353.8, 'pred_temp': 45.6155641418, 'pred_time': '2024-04-25T12:52:45', 'target_time': '2024-04-25T16:00:00'}, {'CoolWay': '单4风机', 'FinishTime': '2024-04-23T16:07:00', 'NewCoilNumber': '24044267', 'RATemp': 325.0, 'pred_temp': 31.5217951331, 'pred_time': '2024-04-24T19:12:05', 'target_time': '2024-04-25T16:00:00'}, {'CoolWay': '单4风机', 'FinishTime': '2024-04-23T05:12:00', 'NewCoilNumber': '34042692', 'RATemp': 358.1, 'pred_temp': 31.3485479236, 'pred_time': '2024-04-24T14:43:41', 'target_time': '2024-04-25T16:00:00'}, {'CoolWay': '单4风机', 'FinishTime': '2024-04-24T04:33:00', 'NewCoilNumber': '34033397', 'RATemp': 385.0, 'pred_temp': 48.1132385166, 'pred_time': '2024-04-25T14:51:01', 'target_time': '2024-04-25T16:00:00'}, {'CoolWay': '单4风机', 'FinishTime': '2024-04-23T05:12:00', 'NewCoilNumber': '34042693', 'RATemp': 358.1, 'pred_temp': 30.9944238815, 'pred_time': '2024-04-24T13:47:06', 'target_time': '2024-04-25T16:00:00'}, {'CoolWay': '单4风机', 'FinishTime': '2024-04-23T11:58:00', 'NewCoilNumber': '34044453', 'RATemp': 395.0, 'pred_temp': 31.8604819893, 'pred_time': '2024-04-24T18:47:27', 'target_time': '2024-04-25T16:00:00'}, {'CoolWay': '单4风机', 'FinishTime': '2024-04-23T07:57:00', 'NewCoilNumber': '34033395', 'RATemp': 360.0, 'pred_temp': 32.0665878582, 'pred_time': '2024-04-24T17:14:27', 'target_time': '2024-04-25T16:00:00'}, {'CoolWay': '单4风机', 'FinishTime': '2024-04-23T18:44:00', 'NewCoilNumber': '24032972', 'RATemp': 398.0, 'pred_temp': 33.2636976926, 'pred_time': '2024-04-24T23:51:39', 'target_time': '2024-04-25T16:00:00'}, {'CoolWay': '单4风机', 'FinishTime': '2024-04-24T16:34:00', 'NewCoilNumber': '34042087', 'RATemp': 400.0, 'pred_temp': 75.4395344323, 'pred_time': '2024-04-26T01:07:50', 'target_time': '2024-04-25T16:00:00'}, {'CoolWay': '单4风机', 'FinishTime': '2024-04-23T16:07:00', 'NewCoilNumber': '24044277', 'RATemp': 325.0, 'pred_temp': 31.489870776, 'pred_time': '2024-04-24T19:08:07', 'target_time': '2024-04-25T16:00:00'}, {'CoolWay': '自然冷却', 'FinishTime': '2024-04-23T06:33:00', 'NewCoilNumber': '34044405', 'RATemp': 361.0, 'pred_temp': 36.7251409134, 'pred_time': '2024-04-25T00:52:17', 'target_time': '2024-04-25T16:00:00'}, {'CoolWay': '大风机+单4', 'FinishTime': '2024-04-23T21:31:00', 'NewCoilNumber': '34042453', 'RATemp': 395.0, 'pred_temp': 33.0653247607, 'pred_time': '2024-04-25T00:34:55', 'target_time': '2024-04-25T16:00:00'}, {'CoolWay': '单4风机', 'FinishTime': '2024-04-24T02:05:00', 'NewCoilNumber': '34032452-1', 'RATemp': 360.0, 'pred_temp': 29.9350975945, 'pred_time': '2024-04-24T20:25:50', 'target_time': '2024-04-25T16:00:00'}, {'CoolWay': '单4风机', 'FinishTime': '2024-04-23T18:16:00', 'NewCoilNumber': '34042367-2', 'RATemp': 271.0, 'pred_temp': 33.9537057294, 'pred_time': '2024-04-24T23:14:56', 'target_time': '2024-04-25T16:00:00'}, {'CoolWay': '自然冷却', 'FinishTime': '2024-04-24T02:00:00', 'NewCoilNumber': '34042037', 'RATemp': 307.7, 'pred_temp': 63.5853228105, 'pred_time': '2024-04-26T01:01:01', 'target_time': '2024-04-25T16:00:00'}, {'CoolWay': '自然冷却', 'FinishTime': '2024-04-24T05:15:00', 'NewCoilNumber': '34042105', 'RATemp': 397.1, 'pred_temp': 62.983793697, 'pred_time': '2024-04-25T23:01:35', 'target_time': '2024-04-25T16:00:00'}, {'CoolWay': '自然冷却', 'FinishTime': '2024-04-24T19:32:00', 'NewCoilNumber': '24044371', 'RATemp': 351.2, 'pred_temp': 120.2673550583, 'pred_time': '2024-04-26T16:23:49', 'target_time': '2024-04-25T16:00:00'}, {'CoolWay': '单4风机', 'FinishTime': '2024-04-24T01:27:00', 'NewCoilNumber': '24044275', 'RATemp': 360.0, 'pred_temp': 35.6675720048, 'pred_time': '2024-04-25T04:41:24', 'target_time': '2024-04-25T16:00:00'}, {'CoolWay': '单4风机', 'FinishTime': '2024-04-24T16:15:00', 'NewCoilNumber': '34042331', 'RATemp': 241.0, 'pred_temp': 61.566974765, 'pred_time': '2024-04-25T21:35:46', 'target_time': '2024-04-25T16:00:00'}, {'CoolWay': '单4风机', 'FinishTime': '2024-04-24T16:54:00', 'NewCoilNumber': '24044472', 'RATemp': 395.0, 'pred_temp': 75.1740087197, 'pred_time': '2024-04-26T01:05:56', 'target_time': '2024-04-25T16:00:00'}, {'CoolWay': '自然冷却', 'FinishTime': '2024-04-24T03:50:00', 'NewCoilNumber': '24032601', 'RATemp': 341.6, 'pred_temp': 57.2320762771, 'pred_time': '2024-04-25T20:31:11', 'target_time': '2024-04-25T16:00:00'}, {'CoolWay': '单4风机', 'FinishTime': '2024-04-24T18:35:00', 'NewCoilNumber': '24044502', 'RATemp': 362.0, 'pred_temp': 81.8266124359, 'pred_time': '2024-04-26T02:59:11', 'target_time': '2024-04-25T16:00:00'}, {'CoolWay': '单4风机', 'FinishTime': '2024-04-24T21:34:00', 'NewCoilNumber': '34042691', 'RATemp': 360.0, 'pred_temp': 94.3457452337, 'pred_time': '2024-04-26T05:15:29', 'target_time': '2024-04-25T16:00:00'}, {'CoolWay': '自然冷却', 'FinishTime': '2024-04-24T00:25:00', 'NewCoilNumber': '34035153', 'RATemp': 353.8, 'pred_temp': 41.8840477999, 'pred_time': '2024-04-25T10:00:30', 'target_time': '2024-04-25T16:00:00'}, {'CoolWay': '单4风机', 'FinishTime': '2024-04-23T10:11:00', 'NewCoilNumber': '24042155', 'RATemp': 304.0, 'pred_temp': 34.2657305197, 'pred_time': '2024-04-24T21:32:07', 'target_time': '2024-04-25T16:00:00'}, {'CoolWay': '自然冷却', 'FinishTime': '2024-04-23T02:45:00', 'NewCoilNumber': '24034107-1', 'RATemp': 385.0, 'pred_temp': 28.8935496118, 'pred_time': '2024-04-23T15:58:48', 'target_time': '2024-04-25T16:00:00'}, {'CoolWay': '单4风机', 'FinishTime': '2024-04-24T17:53:00', 'NewCoilNumber': '24032554', 'RATemp': 340.0, 'pred_temp': 76.8060383832, 'pred_time': '2024-04-26T02:04:00', 'target_time': '2024-04-25T16:00:00'}, {'CoolWay': '单4风机', 'FinishTime': '2024-04-24T07:50:00', 'NewCoilNumber': '24044395', 'RATemp': 354.0, 'pred_temp': 42.5892290535, 'pred_time': '2024-04-25T11:30:47', 'target_time': '2024-04-25T16:00:00'}, {'CoolWay': '自然冷却', 'FinishTime': '2024-04-24T23:49:00', 'NewCoilNumber': '24042066', 'RATemp': 397.5, 'pred_temp': 131.5501315804, 'pred_time': '2024-04-26T13:01:38', 'target_time': '2024-04-25T16:00:00'}, {'CoolWay': '单4风机', 'FinishTime': '2024-04-24T07:50:00', 'NewCoilNumber': '24044393', 'RATemp': 354.0, 'pred_temp': 41.5719518546, 'pred_time': '2024-04-25T10:50:19', 'target_time': '2024-04-25T16:00:00'}, {'CoolWay': '单4风机', 'FinishTime': '2024-04-23T18:44:00', 'NewCoilNumber': '34044455', 'RATemp': 398.0, 'pred_temp': 34.4363398381, 'pred_time': '2024-04-25T01:30:21', 'target_time': '2024-04-25T16:00:00'}, {'CoolWay': '自然冷却', 'FinishTime': '2024-04-23T21:57:00', 'NewCoilNumber': '24044272', 'RATemp': 360.0, 'pred_temp': 40.4872880191, 'pred_time': '2024-04-25T08:22:21', 'target_time': '2024-04-25T16:00:00'}, {'CoolWay': '单4风机', 'FinishTime': '2024-04-24T13:03:00', 'NewCoilNumber': '34042086-1', 'RATemp': 398.0, 'pred_temp': 44.6530469024, 'pred_time': '2024-04-25T13:30:17', 'target_time': '2024-04-25T16:00:00'}, {'CoolWay': '单4风机', 'FinishTime': '2024-04-23T10:05:00', 'NewCoilNumber': '24044342', 'RATemp': 350.0, 'pred_temp': 33.2880074438, 'pred_time': '2024-04-24T20:34:52', 'target_time': '2024-04-25T16:00:00'}, {'CoolWay': '单4风机', 'FinishTime': '2024-04-24T14:49:00', 'NewCoilNumber': '24042147', 'RATemp': 299.0, 'pred_temp': 65.7472429345, 'pred_time': '2024-04-25T23:15:35', 'target_time': '2024-04-25T16:00:00'}, {'CoolWay': '单4风机', 'FinishTime': '2024-03-16T20:39:00', 'NewCoilNumber': '34022382', 'RATemp': 395.0, 'pred_temp': 29.1936904636, 'pred_time': '2024-03-18T07:52:00', 'target_time': '2024-04-25T16:00:00'}, {'CoolWay': '自然冷却', 'FinishTime': '2024-04-24T03:50:00', 'NewCoilNumber': '24032607', 'RATemp': 341.6, 'pred_temp': 58.1370487549, 'pred_time': '2024-04-25T21:04:06', 'target_time': '2024-04-25T16:00:00'}, {'CoolWay': '自然冷却', 'FinishTime': '2024-04-24T17:13:00', 'NewCoilNumber': '34044147-2', 'RATemp': 330.0, 'pred_temp': 44.8579215193, 'pred_time': '2024-04-25T13:49:00', 'target_time': '2024-04-25T16:00:00'}, {'CoolWay': '自然冷却', 'FinishTime': '2024-04-23T22:40:00', 'NewCoilNumber': '34044332-1', 'RATemp': 398.2, 'pred_temp': 37.6934333979, 'pred_time': '2024-04-25T06:14:28', 'target_time': '2024-04-25T16:00:00'}, {'CoolWay': '自然冷却', 'FinishTime': '2024-04-24T21:04:00', 'NewCoilNumber': '34042312', 'RATemp': 342.6, 'pred_temp': 142.4162851709, 'pred_time': '2024-04-26T23:26:11', 'target_time': '2024-04-25T16:00:00'}], 'success': True}

import pandas as pd

df = pd.DataFrame()
df["pred_time"] = ["2024-04-23T06:33:00"] * 2

print(pd.to_datetime(df["pred_time"]))
# print(pd.Timestamp(df["pred_time"]))

TypeError: Cannot convert input [0    2024-04-23T06:33:00

1    2024-04-23T06:33:00

Name: pred_time, dtype: object] of type <class 'pandas.core.series.Series'> to Timestamp

pandas.Timestamp.combine

>>> from datetime import date, time

>>> pd.Timestamp.combine(date(2020, 3, 14), time(15, 30, 15))

Timestamp('2020-03-14 15:30:15')

from datetime import datetime, time

# 获取当前日期和时间
now = datetime.now()

# 创建一个时间对象
t = time(hour=14, minute=30, second=0)

# 拼接日期和时间
result = datetime.combine(now.date(), t)

print(result)  # 输出结果类似于:2024-04-26 14:30:00
datetime.datetime.combine(self.date, datetime.time(8))

python 面向对象 建议可以将某个函数命名为main吗

class MyClass():
    def __init__(self):
        self.var = "var"
        # self.main(var)  # 无效 if MyClass() but need MyClass().main()
        # return self.main()  # TypeError: __init__() should return None, not 'int'

    def main(self, var=None):
        var = self.var
        return var
print(MyClass().main())
if {None: None}:
    print(1)
print(len(str(None)))  # 4
output = {'result': [{'CoolWay': '自然冷却', 'FinishTime': '2024-04-23T06:33:00', 'NewCoilNumber': '34044406', 'RATemp': 361.0, 'pred_temp': 36.8879345272, 'pred_time': '2024-04-25T01:06:06', 'target_time': '2024-04-25T16:00:00'}, {'CoolWay': '自然冷却', 'FinishTime': '2024-04-24T19:32:00', 'NewCoilNumber': '34044334', 'RATemp': 352.0, 'pred_temp': 121.1611709114, 'pred_time': '2024-04-26T16:42:04', 'target_time': '2024-04-25T16:00:00'}, {'CoolWay': '自然冷却', 'FinishTime': '2024-03-16T17:12:00', 'NewCoilNumber': '34022361', 'RATemp': 395.0, 'pred_temp': 29.3584824474, 'pred_time': '2024-03-18T18:55:54', 'target_time': '2024-04-25T16:00:00'}, {'CoolWay': '单4风机', 'FinishTime': '2024-03-15T09:33:00', 'NewCoilNumber': '82403101', 'RATemp': 450.0, 'pred_temp': 29.1905458123, 'pred_time': '2024-03-17T00:38:22', 'target_time': '2024-04-25T16:00:00'}, {'CoolWay': '自然冷却', 'FinishTime': '2024-04-24T23:49:00', 'NewCoilNumber': '24042067', 'RATemp': 397.5, 'pred_temp': 133.2081915551, 'pred_time': '2024-04-26T13:30:35', 'target_time': '2024-04-25T16:00:00'}, {'CoolWay': '单4风机', 'FinishTime': '2024-04-23T00:43:00', 'NewCoilNumber': '34034555', 'RATemp': 351.6, 'pred_temp': 29.5967193996, 'pred_time': '2024-04-24T06:23:12', 'target_time': '2024-04-25T16:00:00'}, {'CoolWay': '单4风机', 'FinishTime': '2024-04-24T10:21:00', 'NewCoilNumber': '24044505', 'RATemp': 352.0, 'pred_temp': 56.9072889648, 'pred_time': '2024-04-25T19:27:47', 'target_time': '2024-04-25T16:00:00'}, {'CoolWay': '自然冷却', 'FinishTime': '2024-04-24T23:49:00', 'NewCoilNumber': '24042065', 'RATemp': 397.5, 'pred_temp': 131.2249652532, 'pred_time': '2024-04-26T12:55:59', 'target_time': '2024-04-25T16:00:00'}, {'CoolWay': '单4风机', 'FinishTime': '2024-04-24T10:43:00', 'NewCoilNumber': '24044476', 'RATemp': 365.0, 'pred_temp': 53.8499767718, 'pred_time': '2024-04-25T17:55:38', 'target_time': '2024-04-25T16:00:00'}, {'CoolWay': '自然冷却', 'FinishTime': '2024-04-24T19:32:00', 'NewCoilNumber': '34044344', 'RATemp': 351.2, 'pred_temp': 121.8786277235, 'pred_time': '2024-04-26T17:02:06', 'target_time': '2024-04-25T16:00:00'}, {'CoolWay': '自然冷却', 'FinishTime': '2024-04-23T21:51:00', 'NewCoilNumber': '24044282', 'RATemp': 398.0, 'pred_temp': 45.0413133471, 'pred_time': '2024-04-25T12:20:36', 'target_time': '2024-04-25T16:00:00'}, {'CoolWay': '自然冷却', 'FinishTime': '2024-04-24T00:15:00', 'NewCoilNumber': '82404031', 'RATemp': 450.0, 'pred_temp': 86.1071084825, 'pred_time': '2024-04-26T11:54:48', 'target_time': '2024-04-25T16:00:00'}, {'CoolWay': '自然冷却', 'FinishTime': '2024-04-24T03:50:00', 'NewCoilNumber': '24032606', 'RATemp': 341.6, 'pred_temp': 56.7613275148, 'pred_time': '2024-04-25T20:13:59', 'target_time': '2024-04-25T16:00:00'}, {'CoolWay': '单4风机', 'FinishTime': '2024-04-24T10:41:00', 'NewCoilNumber': '34044435', 'RATemp': 398.0, 'pred_temp': 53.5535974239, 'pred_time': '2024-04-25T17:43:13', 'target_time': '2024-04-25T16:00:00'}, {'CoolWay': '单4风机', 'FinishTime': '2024-04-23T07:55:00', 'NewCoilNumber': '34044313', 'RATemp': 350.0, 'pred_temp': 31.3657276677, 'pred_time': '2024-04-24T15:28:26', 'target_time': '2024-04-25T16:00:00'}, {'CoolWay': '单4风机', 'FinishTime': '2024-04-24T10:41:00', 'NewCoilNumber': '34044436', 'RATemp': 398.0, 'pred_temp': 53.8055632241, 'pred_time': '2024-04-25T17:50:22', 'target_time': '2024-04-25T16:00:00'}, {'CoolWay': '单4风机', 'FinishTime': '2024-03-15T09:33:00', 'NewCoilNumber': '82403111', 'RATemp': 450.0, 'pred_temp': 29.1873414346, 'pred_time': '2024-03-17T00:25:53', 'target_time': '2024-04-25T16:00:00'}, {'CoolWay': '单4风机', 'FinishTime': '2024-04-24T14:46:00', 'NewCoilNumber': '24044481', 'RATemp': 395.0, 'pred_temp': 67.4195861828, 'pred_time': '2024-04-25T22:56:11', 'target_time': '2024-04-25T16:00:00'}, {'CoolWay': '自然冷却', 'FinishTime': '2024-04-23T21:57:00', 'NewCoilNumber': '24044235-2', 'RATemp': 360.0, 'pred_temp': 34.333665671, 'pred_time': '2024-04-25T01:57:06', 'target_time': '2024-04-25T16:00:00'}, {'CoolWay': '单4风机', 'FinishTime': '2024-04-23T00:43:00', 'NewCoilNumber': '24042111', 'RATemp': 351.6, 'pred_temp': 29.6914709181, 'pred_time': '2024-04-24T06:50:01', 'target_time': '2024-04-25T16:00:00'}, {'CoolWay': '自然冷却', 'FinishTime': '2024-04-23T21:51:00', 'NewCoilNumber': '24044283', 'RATemp': 398.0, 'pred_temp': 43.768873431, 'pred_time': '2024-04-25T11:20:45', 'target_time': '2024-04-25T16:00:00'}, {'CoolWay': '单4风机', 'FinishTime': '2024-04-24T01:27:00', 'NewCoilNumber': '24044273', 'RATemp': 360.0, 'pred_temp': 36.003928086, 'pred_time': '2024-04-25T05:02:04', 'target_time': '2024-04-25T16:00:00'}, {'CoolWay': '自然冷却', 'FinishTime': '2024-04-24T19:32:00', 'NewCoilNumber': '34044343', 'RATemp': 352.0, 'pred_temp': 120.2028319795, 'pred_time': '2024-04-26T16:19:25', 'target_time': '2024-04-25T16:00:00'}, {'CoolWay': '单4风机', 'FinishTime': '2024-04-23T11:35:00', 'NewCoilNumber': '34042386-1', 'RATemp': 283.0, 'pred_temp': 29.8234252489, 'pred_time': '2024-04-24T11:33:48', 'target_time': '2024-04-25T16:00:00'}, {'CoolWay': '单4风机', 'FinishTime': '2024-04-24T07:50:00', 'NewCoilNumber': '24044207', 'RATemp': 354.0, 'pred_temp': 41.3384003615, 'pred_time': '2024-04-25T10:40:51', 'target_time': '2024-04-25T16:00:00'}, {'CoolWay': '单4风机', 'FinishTime': '2024-04-23T06:38:00', 'NewCoilNumber': '24044286', 'RATemp': 350.6, 'pred_temp': 30.2352369463, 'pred_time': '2024-04-24T11:46:40', 'target_time': '2024-04-25T16:00:00'}, {'CoolWay': '单4风机', 'FinishTime': '2024-04-24T18:35:00', 'NewCoilNumber': '24044501', 'RATemp': 362.0, 'pred_temp': 81.861909118, 'pred_time': '2024-04-26T02:59:54', 'target_time': '2024-04-25T16:00:00'}, {'CoolWay': '单4风机', 'FinishTime': '2024-04-23T11:58:00', 'NewCoilNumber': '34044451', 'RATemp': 395.0, 'pred_temp': 31.8911833104, 'pred_time': '2024-04-24T18:51:19', 'target_time': '2024-04-25T16:00:00'}, {'CoolWay': '单4风机', 'FinishTime': '2024-04-24T01:27:00', 'NewCoilNumber': '24044232', 'RATemp': 360.0, 'pred_temp': 36.0320440865, 'pred_time': '2024-04-25T05:03:46', 'target_time': '2024-04-25T16:00:00'}, {'CoolWay': '单4风机', 'FinishTime': '2024-04-24T05:46:00', 'NewCoilNumber': '34044146-2', 'RATemp': 330.0, 'pred_temp': 31.7835211342, 'pred_time': '2024-04-25T01:08:45', 'target_time': '2024-04-25T16:00:00'}, {'CoolWay': '单4风机', 'FinishTime': '2024-04-24T16:54:00', 'NewCoilNumber': '24044471', 'RATemp': 395.0, 'pred_temp': 73.4219430765, 'pred_time': '2024-04-26T00:29:35', 'target_time': '2024-04-25T16:00:00'}, {'CoolWay': '单4风机', 'FinishTime': '2024-04-24T10:41:00', 'NewCoilNumber': '34044437', 'RATemp': 398.0, 'pred_temp': 53.8614605163, 'pred_time': '2024-04-25T17:51:57', 'target_time': '2024-04-25T16:00:00'}, {'CoolWay': '单4风机', 'FinishTime': '2024-04-23T10:05:00', 'NewCoilNumber': '24044373', 'RATemp': 350.0, 'pred_temp': 32.3586047542, 'pred_time': '2024-04-24T18:51:11', 'target_time': '2024-04-25T16:00:00'}, {'CoolWay': '单4风机', 'FinishTime': '2024-04-24T17:53:00', 'NewCoilNumber': '24032581', 'RATemp': 340.0, 'pred_temp': 70.296098533, 'pred_time': '2024-04-25T23:40:27', 'target_time': '2024-04-25T16:00:00'}, {'CoolWay': '大风机+单4', 'FinishTime': '2024-04-24T07:21:00', 'NewCoilNumber': '24042171', 'RATemp': 336.0, 'pred_temp': 37.6259160095, 'pred_time': '2024-04-25T07:51:40', 'target_time': '2024-04-25T16:00:00'}, {'CoolWay': '自然冷却', 'FinishTime': '2024-04-24T05:15:00', 'NewCoilNumber': '34042106', 'RATemp': 397.1, 'pred_temp': 63.2135452256, 'pred_time': '2024-04-25T23:08:42', 'target_time': '2024-04-25T16:00:00'}, {'CoolWay': '单4风机', 'FinishTime': '2024-04-23T15:36:00', 'NewCoilNumber': '34044333', 'RATemp': 353.0, 'pred_temp': 34.4409498982, 'pred_time': '2024-04-25T00:06:28', 'target_time': '2024-04-25T16:00:00'}, {'CoolWay': '自然冷却', 'FinishTime': '2024-04-23T06:33:00', 'NewCoilNumber': '34044407', 'RATemp': 361.0, 'pred_temp': 36.9920444728, 'pred_time': '2024-04-25T01:14:52', 'target_time': '2024-04-25T16:00:00'}, {'CoolWay': '自然冷却', 'FinishTime': '2024-04-24T02:07:00', 'NewCoilNumber': '34032406', 'RATemp': 385.0, 'pred_temp': 46.1819383042, 'pred_time': '2024-04-25T13:30:22', 'target_time': '2024-04-25T16:00:00'}, {'CoolWay': '自然冷却', 'FinishTime': '2024-04-24T00:25:00', 'NewCoilNumber': '24044206', 'RATemp': 353.8, 'pred_temp': 45.7733479312, 'pred_time': '2024-04-25T12:59:44', 'target_time': '2024-04-25T16:00:00'}, {'CoolWay': '自然冷却', 'FinishTime': '2024-04-24T05:15:00', 'NewCoilNumber': '34042107', 'RATemp': 397.1, 'pred_temp': 63.856503986, 'pred_time': '2024-04-25T23:28:35', 'target_time': '2024-04-25T16:00:00'}, {'CoolWay': '自然冷却', 'FinishTime': '2024-04-23T01:10:00', 'NewCoilNumber': '24032901-1', 'RATemp': 411.0, 'pred_temp': 29.2581031355, 'pred_time': '2024-04-24T05:45:34', 'target_time': '2024-04-25T16:00:00'}, {'CoolWay': '单4风机', 'FinishTime': '2024-04-06T04:04:00', 'NewCoilNumber': '82403243', 'RATemp': 450.0, 'pred_temp': 29.1744353664, 'pred_time': '2024-04-07T16:35:37', 'target_time': '2024-04-25T16:00:00'}, {'CoolWay': '单4风机', 'FinishTime': '2024-04-23T10:05:00', 'NewCoilNumber': '24044375', 'RATemp': 350.0, 'pred_temp': 32.7034143704, 'pred_time': '2024-04-24T19:31:08', 'target_time': '2024-04-25T16:00:00'}, {'CoolWay': '单4风机', 'FinishTime': '2024-04-23T00:43:00', 'NewCoilNumber': '24042112', 'RATemp': 351.6, 'pred_temp': 29.6935914294, 'pred_time': '2024-04-24T06:50:36', 'target_time': '2024-04-25T16:00:00'}, {'CoolWay': '自然冷却', 'FinishTime': '2024-04-06T07:51:00', 'NewCoilNumber': '82403251', 'RATemp': 451.0, 'pred_temp': 29.3339486297, 'pred_time': '2024-04-08T10:57:18', 'target_time': '2024-04-25T16:00:00'}, {'CoolWay': '自然冷却', 'FinishTime': '2024-04-23T02:45:00', 'NewCoilNumber': '34032391-1', 'RATemp': 385.0, 'pred_temp': 28.9027791927, 'pred_time': '2024-04-23T17:00:34', 'target_time': '2024-04-25T16:00:00'}, {'CoolWay': '单4风机', 'FinishTime': '2024-04-24T10:43:00', 'NewCoilNumber': '24044417', 'RATemp': 365.0, 'pred_temp': 54.3454435119, 'pred_time': '2024-04-25T18:10:11', 'target_time': '2024-04-25T16:00:00'}, {'CoolWay': '自然冷却', 'FinishTime': '2024-04-24T02:00:00', 'NewCoilNumber': '34042036', 'RATemp': 307.7, 'pred_temp': 63.5023660497, 'pred_time': '2024-04-26T00:57:48', 'target_time': '2024-04-25T16:00:00'}, {'CoolWay': '双4风机', 'FinishTime': '2024-04-23T06:38:00', 'NewCoilNumber': '24044391', 'RATemp': 350.6, 'pred_temp': 29.0212912581, 'pred_time': '2024-04-24T06:01:01', 'target_time': '2024-04-25T16:00:00'}, {'CoolWay': '单4风机', 'FinishTime': '2024-04-24T04:15:00', 'NewCoilNumber': '24044276', 'RATemp': 360.0, 'pred_temp': 38.3311944908, 'pred_time': '2024-04-25T07:54:09', 'target_time': '2024-04-25T16:00:00'}, {'CoolWay': '单4风机', 'FinishTime': '2024-04-23T07:55:00', 'NewCoilNumber': '24044341', 'RATemp': 350.0, 'pred_temp': 32.1722471063, 'pred_time': '2024-04-24T17:19:29', 'target_time': '2024-04-25T16:00:00'}, {'CoolWay': '单4风机', 'FinishTime': '2024-04-24T10:21:00', 'NewCoilNumber': '24044507', 'RATemp': 352.0, 'pred_temp': 56.8367399571, 'pred_time': '2024-04-25T19:25:43', 'target_time': '2024-04-25T16:00:00'}, {'CoolWay': '自然冷却', 'FinishTime': '2024-04-23T21:51:00', 'NewCoilNumber': '24044285', 'RATemp': 398.0, 'pred_temp': 44.6458000778, 'pred_time': '2024-04-25T12:02:11', 'target_time': '2024-04-25T16:00:00'}, {'CoolWay': '单4风机', 'FinishTime': '2024-04-24T14:46:00', 'NewCoilNumber': '24044475', 'RATemp': 395.0, 'pred_temp': 65.9150597241, 'pred_time': '2024-04-25T22:21:52', 'target_time': '2024-04-25T16:00:00'}, {'CoolWay': '单4风机', 'FinishTime': '2024-04-24T18:35:00', 'NewCoilNumber': '24044503', 'RATemp': 362.0, 'pred_temp': 83.9119949639, 'pred_time': '2024-04-26T03:41:38', 'target_time': '2024-04-25T16:00:00'}, {'CoolWay': '单4风机', 'FinishTime': '2024-04-23T18:11:00', 'NewCoilNumber': '24042163', 'RATemp': 294.0, 'pred_temp': 37.1337672387, 'pred_time': '2024-04-25T03:40:17', 'target_time': '2024-04-25T16:00:00'}, {'CoolWay': '单4风机', 'FinishTime': '2024-04-23T15:36:00', 'NewCoilNumber': '34044341', 'RATemp': 353.0, 'pred_temp': 34.3350113579, 'pred_time': '2024-04-24T23:57:22', 'target_time': '2024-04-25T16:00:00'}, {'CoolWay': '单4风机', 'FinishTime': '2024-04-24T01:27:00', 'NewCoilNumber': '24044231', 'RATemp': 360.0, 'pred_temp': 35.8214895963, 'pred_time': '2024-04-25T04:50:55', 'target_time': '2024-04-25T16:00:00'}, {'CoolWay': '单4风机', 'FinishTime': '2024-04-23T11:58:00', 'NewCoilNumber': '34044452', 'RATemp': 395.0, 'pred_temp': 31.9158110231, 'pred_time': '2024-04-24T18:54:24', 'target_time': '2024-04-25T16:00:00'}, {'CoolWay': '单4风机', 'FinishTime': '2024-04-24T10:21:00', 'NewCoilNumber': '24044506', 'RATemp': 352.0, 'pred_temp': 56.7190181349, 'pred_time': '2024-04-25T19:22:16', 'target_time': '2024-04-25T16:00:00'}, {'CoolWay': '自然冷却', 'FinishTime': '2024-04-24T00:15:00', 'NewCoilNumber': '82404041', 'RATemp': 450.0, 'pred_temp': 85.9478345232, 'pred_time': '2024-04-26T11:49:47', 'target_time': '2024-04-25T16:00:00'}, {'CoolWay': '单4风机', 'FinishTime': '2024-04-23T10:11:00', 'NewCoilNumber': '24042153', 'RATemp': 304.0, 'pred_temp': 34.331452069, 'pred_time': '2024-04-24T21:38:28', 'target_time': '2024-04-25T16:00:00'}, {'CoolWay': '单4风机', 'FinishTime': '2024-04-24T04:15:00', 'NewCoilNumber': '24044271', 'RATemp': 360.0, 'pred_temp': 38.3486012085, 'pred_time': '2024-04-25T07:55:01', 'target_time': '2024-04-25T16:00:00'}, {'CoolWay': '单4风机', 'FinishTime': '2024-04-23T15:36:00', 'NewCoilNumber': '34044331', 'RATemp': 353.0, 'pred_temp': 35.2482398695, 'pred_time': '2024-04-25T01:13:13', 'target_time': '2024-04-25T16:00:00'}, {'CoolWay': '单4风机', 'FinishTime': '2024-04-23T07:57:00', 'NewCoilNumber': '34033396', 'RATemp': 360.0, 'pred_temp': 32.3406775117, 'pred_time': '2024-04-24T17:49:25', 'target_time': '2024-04-25T16:00:00'}, {'CoolWay': '自然冷却', 'FinishTime': '2024-04-24T21:04:00', 'NewCoilNumber': '34042311', 'RATemp': 342.6, 'pred_temp': 141.8636215638, 'pred_time': '2024-04-26T23:11:44', 'target_time': '2024-04-25T16:00:00'}, {'CoolWay': '单4风机', 'FinishTime': '2024-04-23T18:44:00', 'NewCoilNumber': '34044133', 'RATemp': 398.0, 'pred_temp': 36.1847912447, 'pred_time': '2024-04-25T03:39:35', 'target_time': '2024-04-25T16:00:00'}, {'CoolWay': '单4风机', 'FinishTime': '2024-04-23T06:38:00', 'NewCoilNumber': '24044287', 'RATemp': 350.6, 'pred_temp': 30.3445809111, 'pred_time': '2024-04-24T12:08:52', 'target_time': '2024-04-25T16:00:00'}, {'CoolWay': '单4风机', 'FinishTime': '2024-04-23T16:07:00', 'NewCoilNumber': '24044233', 'RATemp': 325.0, 'pred_temp': 31.6053100865, 'pred_time': '2024-04-24T19:22:21', 'target_time': '2024-04-25T16:00:00'}, {'CoolWay': '自然冷却', 'FinishTime': '2024-04-23T22:40:00', 'NewCoilNumber': '34044332-2', 'RATemp': 398.2, 'pred_temp': 32.6913846471, 'pred_time': '2024-04-25T00:25:21', 'target_time': '2024-04-25T16:00:00'}, {'CoolWay': '单4风机', 'FinishTime': '2024-04-23T07:57:00', 'NewCoilNumber': '34033393', 'RATemp': 360.0, 'pred_temp': 32.2294982518, 'pred_time': '2024-04-24T17:35:25', 'target_time': '2024-04-25T16:00:00'}, {'CoolWay': '自然冷却', 'FinishTime': '2024-04-24T19:32:00', 'NewCoilNumber': '34044342', 'RATemp': 352.0, 'pred_temp': 121.7418363146, 'pred_time': '2024-04-26T16:55:52', 'target_time': '2024-04-25T16:00:00'}, {'CoolWay': '自然冷却', 'FinishTime': '2024-04-24T21:04:00', 'NewCoilNumber': '34042313', 'RATemp': 342.6, 'pred_temp': 142.0341391686, 'pred_time': '2024-04-26T23:16:11', 'target_time': '2024-04-25T16:00:00'}, {'CoolWay': '单4风机', 'FinishTime': '2024-04-24T13:03:00', 'NewCoilNumber': '24032961-2', 'RATemp': 398.0, 'pred_temp': 42.7438431774, 'pred_time': '2024-04-25T12:32:37', 'target_time': '2024-04-25T16:00:00'}, {'CoolWay': '单4风机', 'FinishTime': '2024-04-24T13:03:00', 'NewCoilNumber': '34042083-2', 'RATemp': 398.0, 'pred_temp': 45.0593208343, 'pred_time': '2024-04-25T13:42:13', 'target_time': '2024-04-25T16:00:00'}, {'CoolWay': '单4风机', 'FinishTime': '2024-04-23T10:32:00', 'NewCoilNumber': '34042367-1', 'RATemp': 261.0, 'pred_temp': 28.9294723893, 'pred_time': '2024-04-23T23:54:49', 'target_time': '2024-04-25T16:00:00'}, {'CoolWay': '单4风机', 'FinishTime': '2024-04-24T10:43:00', 'NewCoilNumber': '24044482', 'RATemp': 365.0, 'pred_temp': 53.601009961, 'pred_time': '2024-04-25T17:48:18', 'target_time': '2024-04-25T16:00:00'}, {'CoolWay': '自然冷却', 'FinishTime': '2024-04-23T04:40:00', 'NewCoilNumber': '24034067', 'RATemp': 360.0, 'pred_temp': 32.4866421405, 'pred_time': '2024-04-24T17:00:43', 'target_time': '2024-04-25T16:00:00'}, {'CoolWay': '单4风机', 'FinishTime': '2024-04-23T12:34:00', 'NewCoilNumber': '24042202', 'RATemp': 410.0, 'pred_temp': 39.9763467968, 'pred_time': '2024-04-25T06:37:23', 'target_time': '2024-04-25T16:00:00'}, {'CoolWay': '单4风机', 'FinishTime': '2024-04-24T19:44:00', 'NewCoilNumber': '24044372-1', 'RATemp': 350.0, 'pred_temp': 43.4852853663, 'pred_time': '2024-04-25T13:29:42', 'target_time': '2024-04-25T16:00:00'}, {'CoolWay': '自然冷却', 'FinishTime': '2024-04-23T22:40:00', 'NewCoilNumber': '24044372-2', 'RATemp': 398.2, 'pred_temp': 37.2800633399, 'pred_time': '2024-04-25T05:50:12', 'target_time': '2024-04-25T16:00:00'}, {'CoolWay': '单4风机', 'FinishTime': '2024-04-23T07:55:00', 'NewCoilNumber': '34044314', 'RATemp': 350.0, 'pred_temp': 31.433558431, 'pred_time': '2024-04-24T15:38:26', 'target_time': '2024-04-25T16:00:00'}, {'CoolWay': '单4风机', 'FinishTime': '2024-04-23T16:07:00', 'NewCoilNumber': '24044266', 'RATemp': 325.0, 'pred_temp': 31.6376236597, 'pred_time': '2024-04-24T19:26:17', 'target_time': '2024-04-25T16:00:00'}, {'CoolWay': '自然冷却', 'FinishTime': '2024-04-24T00:25:00', 'NewCoilNumber': '24044396', 'RATemp': 353.8, 'pred_temp': 45.6155641418, 'pred_time': '2024-04-25T12:52:45', 'target_time': '2024-04-25T16:00:00'}, {'CoolWay': '单4风机', 'FinishTime': '2024-04-23T16:07:00', 'NewCoilNumber': '24044267', 'RATemp': 325.0, 'pred_temp': 31.5217951331, 'pred_time': '2024-04-24T19:12:05', 'target_time': '2024-04-25T16:00:00'}, {'CoolWay': '单4风机', 'FinishTime': '2024-04-23T05:12:00', 'NewCoilNumber': '34042692', 'RATemp': 358.1, 'pred_temp': 31.3485479236, 'pred_time': '2024-04-24T14:43:41', 'target_time': '2024-04-25T16:00:00'}, {'CoolWay': '单4风机', 'FinishTime': '2024-04-24T04:33:00', 'NewCoilNumber': '34033397', 'RATemp': 385.0, 'pred_temp': 48.1132385166, 'pred_time': '2024-04-25T14:51:01', 'target_time': '2024-04-25T16:00:00'}, {'CoolWay': '单4风机', 'FinishTime': '2024-04-23T05:12:00', 'NewCoilNumber': '34042693', 'RATemp': 358.1, 'pred_temp': 30.9944238815, 'pred_time': '2024-04-24T13:47:06', 'target_time': '2024-04-25T16:00:00'}, {'CoolWay': '单4风机', 'FinishTime': '2024-04-23T11:58:00', 'NewCoilNumber': '34044453', 'RATemp': 395.0, 'pred_temp': 31.8604819893, 'pred_time': '2024-04-24T18:47:27', 'target_time': '2024-04-25T16:00:00'}, {'CoolWay': '单4风机', 'FinishTime': '2024-04-23T07:57:00', 'NewCoilNumber': '34033395', 'RATemp': 360.0, 'pred_temp': 32.0665878582, 'pred_time': '2024-04-24T17:14:27', 'target_time': '2024-04-25T16:00:00'}, {'CoolWay': '单4风机', 'FinishTime': '2024-04-23T18:44:00', 'NewCoilNumber': '24032972', 'RATemp': 398.0, 'pred_temp': 33.2636976926, 'pred_time': '2024-04-24T23:51:39', 'target_time': '2024-04-25T16:00:00'}, {'CoolWay': '单4风机', 'FinishTime': '2024-04-24T16:34:00', 'NewCoilNumber': '34042087', 'RATemp': 400.0, 'pred_temp': 75.4395344323, 'pred_time': '2024-04-26T01:07:50', 'target_time': '2024-04-25T16:00:00'}, {'CoolWay': '单4风机', 'FinishTime': '2024-04-23T16:07:00', 'NewCoilNumber': '24044277', 'RATemp': 325.0, 'pred_temp': 31.489870776, 'pred_time': '2024-04-24T19:08:07', 'target_time': '2024-04-25T16:00:00'}, {'CoolWay': '自然冷却', 'FinishTime': '2024-04-23T06:33:00', 'NewCoilNumber': '34044405', 'RATemp': 361.0, 'pred_temp': 36.7251409134, 'pred_time': '2024-04-25T00:52:17', 'target_time': '2024-04-25T16:00:00'}, {'CoolWay': '大风机+单4', 'FinishTime': '2024-04-23T21:31:00', 'NewCoilNumber': '34042453', 'RATemp': 395.0, 'pred_temp': 33.0653247607, 'pred_time': '2024-04-25T00:34:55', 'target_time': '2024-04-25T16:00:00'}, {'CoolWay': '单4风机', 'FinishTime': '2024-04-24T02:05:00', 'NewCoilNumber': '34032452-1', 'RATemp': 360.0, 'pred_temp': 29.9350975945, 'pred_time': '2024-04-24T20:25:50', 'target_time': '2024-04-25T16:00:00'}, {'CoolWay': '单4风机', 'FinishTime': '2024-04-23T18:16:00', 'NewCoilNumber': '34042367-2', 'RATemp': 271.0, 'pred_temp': 33.9537057294, 'pred_time': '2024-04-24T23:14:56', 'target_time': '2024-04-25T16:00:00'}, {'CoolWay': '自然冷却', 'FinishTime': '2024-04-24T02:00:00', 'NewCoilNumber': '34042037', 'RATemp': 307.7, 'pred_temp': 63.5853228105, 'pred_time': '2024-04-26T01:01:01', 'target_time': '2024-04-25T16:00:00'}, {'CoolWay': '自然冷却', 'FinishTime': '2024-04-24T05:15:00', 'NewCoilNumber': '34042105', 'RATemp': 397.1, 'pred_temp': 62.983793697, 'pred_time': '2024-04-25T23:01:35', 'target_time': '2024-04-25T16:00:00'}, {'CoolWay': '自然冷却', 'FinishTime': '2024-04-24T19:32:00', 'NewCoilNumber': '24044371', 'RATemp': 351.2, 'pred_temp': 120.2673550583, 'pred_time': '2024-04-26T16:23:49', 'target_time': '2024-04-25T16:00:00'}, {'CoolWay': '单4风机', 'FinishTime': '2024-04-24T01:27:00', 'NewCoilNumber': '24044275', 'RATemp': 360.0, 'pred_temp': 35.6675720048, 'pred_time': '2024-04-25T04:41:24', 'target_time': '2024-04-25T16:00:00'}, {'CoolWay': '单4风机', 'FinishTime': '2024-04-24T16:15:00', 'NewCoilNumber': '34042331', 'RATemp': 241.0, 'pred_temp': 61.566974765, 'pred_time': '2024-04-25T21:35:46', 'target_time': '2024-04-25T16:00:00'}, {'CoolWay': '单4风机', 'FinishTime': '2024-04-24T16:54:00', 'NewCoilNumber': '24044472', 'RATemp': 395.0, 'pred_temp': 75.1740087197, 'pred_time': '2024-04-26T01:05:56', 'target_time': '2024-04-25T16:00:00'}, {'CoolWay': '自然冷却', 'FinishTime': '2024-04-24T03:50:00', 'NewCoilNumber': '24032601', 'RATemp': 341.6, 'pred_temp': 57.2320762771, 'pred_time': '2024-04-25T20:31:11', 'target_time': '2024-04-25T16:00:00'}, {'CoolWay': '单4风机', 'FinishTime': '2024-04-24T18:35:00', 'NewCoilNumber': '24044502', 'RATemp': 362.0, 'pred_temp': 81.8266124359, 'pred_time': '2024-04-26T02:59:11', 'target_time': '2024-04-25T16:00:00'}, {'CoolWay': '单4风机', 'FinishTime': '2024-04-24T21:34:00', 'NewCoilNumber': '34042691', 'RATemp': 360.0, 'pred_temp': 94.3457452337, 'pred_time': '2024-04-26T05:15:29', 'target_time': '2024-04-25T16:00:00'}, {'CoolWay': '自然冷却', 'FinishTime': '2024-04-24T00:25:00', 'NewCoilNumber': '34035153', 'RATemp': 353.8, 'pred_temp': 41.8840477999, 'pred_time': '2024-04-25T10:00:30', 'target_time': '2024-04-25T16:00:00'}, {'CoolWay': '单4风机', 'FinishTime': '2024-04-23T10:11:00', 'NewCoilNumber': '24042155', 'RATemp': 304.0, 'pred_temp': 34.2657305197, 'pred_time': '2024-04-24T21:32:07', 'target_time': '2024-04-25T16:00:00'}, {'CoolWay': '自然冷却', 'FinishTime': '2024-04-23T02:45:00', 'NewCoilNumber': '24034107-1', 'RATemp': 385.0, 'pred_temp': 28.8935496118, 'pred_time': '2024-04-23T15:58:48', 'target_time': '2024-04-25T16:00:00'}, {'CoolWay': '单4风机', 'FinishTime': '2024-04-24T17:53:00', 'NewCoilNumber': '24032554', 'RATemp': 340.0, 'pred_temp': 76.8060383832, 'pred_time': '2024-04-26T02:04:00', 'target_time': '2024-04-25T16:00:00'}, {'CoolWay': '单4风机', 'FinishTime': '2024-04-24T07:50:00', 'NewCoilNumber': '24044395', 'RATemp': 354.0, 'pred_temp': 42.5892290535, 'pred_time': '2024-04-25T11:30:47', 'target_time': '2024-04-25T16:00:00'}, {'CoolWay': '自然冷却', 'FinishTime': '2024-04-24T23:49:00', 'NewCoilNumber': '24042066', 'RATemp': 397.5, 'pred_temp': 131.5501315804, 'pred_time': '2024-04-26T13:01:38', 'target_time': '2024-04-25T16:00:00'}, {'CoolWay': '单4风机', 'FinishTime': '2024-04-24T07:50:00', 'NewCoilNumber': '24044393', 'RATemp': 354.0, 'pred_temp': 41.5719518546, 'pred_time': '2024-04-25T10:50:19', 'target_time': '2024-04-25T16:00:00'}, {'CoolWay': '单4风机', 'FinishTime': '2024-04-23T18:44:00', 'NewCoilNumber': '34044455', 'RATemp': 398.0, 'pred_temp': 34.4363398381, 'pred_time': '2024-04-25T01:30:21', 'target_time': '2024-04-25T16:00:00'}, {'CoolWay': '自然冷却', 'FinishTime': '2024-04-23T21:57:00', 'NewCoilNumber': '24044272', 'RATemp': 360.0, 'pred_temp': 40.4872880191, 'pred_time': '2024-04-25T08:22:21', 'target_time': '2024-04-25T16:00:00'}, {'CoolWay': '单4风机', 'FinishTime': '2024-04-24T13:03:00', 'NewCoilNumber': '34042086-1', 'RATemp': 398.0, 'pred_temp': 44.6530469024, 'pred_time': '2024-04-25T13:30:17', 'target_time': '2024-04-25T16:00:00'}, {'CoolWay': '单4风机', 'FinishTime': '2024-04-23T10:05:00', 'NewCoilNumber': '24044342', 'RATemp': 350.0, 'pred_temp': 33.2880074438, 'pred_time': '2024-04-24T20:34:52', 'target_time': '2024-04-25T16:00:00'}, {'CoolWay': '单4风机', 'FinishTime': '2024-04-24T14:49:00', 'NewCoilNumber': '24042147', 'RATemp': 299.0, 'pred_temp': 65.7472429345, 'pred_time': '2024-04-25T23:15:35', 'target_time': '2024-04-25T16:00:00'}, {'CoolWay': '单4风机', 'FinishTime': '2024-03-16T20:39:00', 'NewCoilNumber': '34022382', 'RATemp': 395.0, 'pred_temp': 29.1936904636, 'pred_time': '2024-03-18T07:52:00', 'target_time': '2024-04-25T16:00:00'}, {'CoolWay': '自然冷却', 'FinishTime': '2024-04-24T03:50:00', 'NewCoilNumber': '24032607', 'RATemp': 341.6, 'pred_temp': 58.1370487549, 'pred_time': '2024-04-25T21:04:06', 'target_time': '2024-04-25T16:00:00'}, {'CoolWay': '自然冷却', 'FinishTime': '2024-04-24T17:13:00', 'NewCoilNumber': '34044147-2', 'RATemp': 330.0, 'pred_temp': 44.8579215193, 'pred_time': '2024-04-25T13:49:00', 'target_time': '2024-04-25T16:00:00'}, {'CoolWay': '自然冷却', 'FinishTime': '2024-04-23T22:40:00', 'NewCoilNumber': '34044332-1', 'RATemp': 398.2, 'pred_temp': 37.6934333979, 'pred_time': '2024-04-25T06:14:28', 'target_time': '2024-04-25T16:00:00'}, {'CoolWay': '自然冷却', 'FinishTime': '2024-04-24T21:04:00', 'NewCoilNumber': '34042312', 'RATemp': 342.6, 'pred_temp': 142.4162851709, 'pred_time': '2024-04-26T23:26:11', 'target_time': '2024-04-25T16:00:00'}], 'success': True}

class Foo():
    def __init__(self):
        self.var = "foo"
    def main(self, var=None):
        var = self.var
        return f"{var}_main"

class Bar(Foo):
    def __init__(self):
        # print(self.var)  # AttributeError: 'Bar' object has no attribute 'var'
        # print(self.main())  # var = self.var AttributeError: 'Bar' object has no attribute 'var'
        super().__init__()
        print(self.var)
        print(self.main())
        self.var = "bar"
        print(self.var)
        print(self.main())
    def main(self, var=None):  # 在一开始就覆盖Foo().main()
        var = self.var
        return f"bar_{var}_main"
Bar()

python 类的继承 遇到两个同名main函数怎么办

在 Python 中,当一个类继承了两个或更多个父类,并且这些父类中有同名的方法时,我们可以使用 super() 来调用不同父类中的同名方法。下面是一些处理同名方法的方法:

  1. 假设类 A 继承了类 BCD,而这些类都有一个名为 show() 的方法:
  • 调用 B 类的 show() 方法:super().show()super(A, self).show()
  • 调用 C 类的 show() 方法:super(B, self).show()
  • 调用 D 类的 show() 方法:super(C, self).show()
  1. 如果在 B 类中需要调用 C 类中的 show() 方法,也可以这样做:
class B:
    def show(self):
        super(B, self).show()

这样,你可以根据需要在不同的父类中调用同名方法。请注意,这里的 super() 会按照方法解析顺序(Method Resolution Order,MRO)来选择下一个父类中的方法。

源: 与必应的对话, 2024/4/26

(1) Python多继承时, 如何灵活调用各个父类中的同名方法 - Sylas - 博客园. https://www.cnblogs.com/sylas/p/12100695.html.

(2) python面向对象(继承与派生、同名方法覆盖以及覆盖的解决办法)3_python 基类和派生类 类名同名-CSDN博客. https://blog.csdn.net/KingOfMyHeart/article/details/89146075.

(3) python继承多个父类,父类中都有同名方法,需要继承所有父类的同名方法_python 继承2个父类的同一个方法-CSDN博客. https://blog.csdn.net/s_daqing/article/details/104755400.

(4) 子类所继承的两个父类有同名纯虚函数,怎么办? - 知乎. https://www.zhihu.com/question/41933390.

在Python中,没有所谓的 main 入口函数,但是经常有人提到“Python中的 main 函数”和“建议编写 main 函数”等。让我们来探讨一下这个话题。

  1. main 函数的意义
  • 在一些编程语言(如C/C++、Java、Go等)中,main 函数是程序的执行入口。
  • 这些语言要求:
  • 必须有一个名为 main 的函数。
  • 最多只能有一个 main 函数,确保程序的唯一入口。
  • main 函数的语法格式有特定要求,通常遵循固定的模板。
  1. 为什么需要 main 函数
  • 这些语言是编译语言,需要将代码编译成可执行的二进制文件。
  • 操作系统引导加载程序需要找到程序的开头,因此需要定义一个入口函数。
  • main 函数在这些语言中是不可或缺的组成部分。
  1. Python 的不同
  • Python 是一种解释语言,运行过程自上而下,逐行进行。
  • Python 的起点是已知的,不需要强制定义一个 main 函数。
  • Python 的 .py 文件可以作为整个程序的入口文件,程序的入口是灵活的,不必遵循任何约定。
  • 有时我们运行 Python 项目时,没有指定入口文件,但通常会执行 main.py 文件,它在包中作为“文件”执行。
  1. 关于 main 函数的误解
  • 有些人在 Python 中编写类似以下代码:
# main file
def main():
    # ...

if __name__ == '__main__':
    main()
  • 这不是 Python 中的真正 main 函数。
  • 除了函数名是 main 之外,它与其他语言中的 main 函数没有关联。
  • 这种写法不是强制的,也不决定程序执行的顺序。
  • 如果只是一个简单的脚本文件,不需要在 __name__ == '__main__' 中写入这句话。

总之,Python 不需要规定必须在语法级别定义一个统一的入口。你可以根据需要选择灵活的执行方式,而不必遵循其他语言的约定。建议使用 main.py 作为入口文件,避免繁琐的代码。¹1 ²2 ³3 ⁴4

源: 与必应的对话, 2024/4/26

(1) 为什么Python没有 main 函数?终于有人给出了正确答案! - 知乎. https://zhuanlan.zhihu.com/p/163443706.

(2) python程序的main函数可以改变为其他名称_在Python中定义Main函数(第三部分)-CSDN博客. https://bing.com/search?q=python+面向对象+建议可以将某个函数命名为main吗.

(3) python程序的main函数可以改变为其他名称_在Python中定义Main函数(第三部分)-CSDN博客. https://blog.csdn.net/weixin_39885383/article/details/110282968.

(4) 史上最全 Python 面向对象编程 - 知乎 - 知乎专栏. https://zhuanlan.zhihu.com/p/61042358.


https://www.xamrdz.com/lan/5kt1935606.html

相关文章: