我有以下格式的 CSV 文件:
DATES, 01-12-2010, 01-12-2010, 01-12-2010, 02-12-2010, 02-12-2010, 02-12-2010
UNITS, Hz, kV, MW, Hz, kV, MW
Interval, , , , , ,
00:15, 49.82, 33.73755, 34.65, 49.92, 33.9009, 36.33,
00:30, 49.9, 33.7722, 35.34, 49.89, 33.8382, 37.65,
00:45, 49.94, 33.8316, 33.5, 50.09, 34.07745, 37.41,
01:00, 49.86, 33.94875, 30.91, 50.18, 34.20945, 36.11,
01:15, 49.97, 34.2243, 27.28, 50.11, 34.3596, 33.24,
01:30, 50.02, 34.3332, 26.91, 50.12, 34.452, 31.03,
01:45, 50.01, 34.1286, 31.26, 50, 33.9306, 38.86,
02:00, 50.08, 33.9141, 34.96, 50.14, 33.99165, 38.31,
02:15, 50.07, 33.84975, 35.33, 50.01, 33.9537, 39.78,
02:30, 49.97, 34.0263, 33.63, 50.07, 33.8547, 41.48,
我想将以上内容转换为以下格式的数据框:
Hz kV MW
DATES_Interval
01-12-2010 00:15 49.82 33.73755 34.65
01-12-2010 00:30 49.9 33.7722 35.34
01-12-2010 00:45 49.94 33.8316 33.5
01-12-2010 01:00 49.86 33.94875 30.91
01-12-2010 01:15 49.97 34.2243 27.28
01-12-2010 01:30 50.02 34.3332 26.91
01-12-2010 01:45 50.01 34.1286 31.26
01-12-2010 02:00 50.08 33.9141 34.96
01-12-2010 02:15 50.07 33.84975 35.33
01-12-2010 02:30 49.97 34.0263 33.63
02-12-2010 00:15 49.92 33.9009 36.33
02-12-2010 00:30 49.89 33.8382 37.65
02-12-2010 00:45 50.09 34.07745 37.41
02-12-2010 01:00 50.09 34.07745 37.41
02-12-2010 01:15 50.11 34.3596 33.24
02-12-2010 01:30 50.12 34.452 31.03
02-12-2010 01:45 50 33.9306 38.86
02-12-2010 02:00 50.14 33.99165 38.31
02-12-2010 02:15 50.01 33.9537 39.78
02-12-2010 02:30 50.07 33.8547 41.48
我如何用熊猫做到这一点?