aardio调用python的pandas

tanzh 2023-8-7 1040

import win.ui;
/*DSG{{*/
mainForm = win.form(text="aardio工程_pandas_py";right=757;bottom=467;bgcolor=15780518)
mainForm.add(
button={cls="button";text="Button";left=192;top=368;right=344;bottom=416;z=1};
edit={cls="edit";left=96;top=72;right=664;bottom=344;ah=1;aw=1;edge=1;multiline=1;vscroll=1;z=2}
)
/*}}*/
 
//aardio调用python
 
import process.python
import process.python.pip
 
//process.python.pip("install pandas")

var pyCode = /*
import sys,os
import pandas as pd
currPath = os.path.split(os.path.realpath(__file__))[0]
print(currPath)
df = pd.read_csv(currPath+"\\test.csv",encoding='gbk')
print(df.info())
print(df.head())
*/
 
mainForm.button.oncommand = function(id,event){
	var py = process.python.exec(pyCode)
	py.logResponse(mainForm.edit)
}
 
mainForm.show();
return win.loopMessage();


最新回复 (2)
  • 光庆 2023-8-9
    0 2

  • lerh 2023-8-9
    0 3
    6666666666666
返回