我有这个代码来生成一个元组对象。我想将其转换为熊猫数据帧。请帮忙。
import win32com.client
import pandas as pd
pw = win32com.client.Dispatch("pwrworld.SimulatorAuto")
infile = "M:/myfile.pwb"
pw.OpenCase(infile)
print ('Case open succecssfully')
objecttype='Gen'
FieldArray = ["BusNum", "GenID", "GenMW", "GenAGCAble"]
genout=pw.GetParametersMultipleElement(objecttype, FieldArray,[])
#______________________________________
#How can I put genout into a dataframe?
#______________________________________
print (type(genout))
#This prints <class 'tuple'>
print (len(genout))
#This prints 2