通達信本地數(shù)據(jù)讀取 Python中如何利用Pandas讀取Excel中的數(shù)據(jù)?
Python中如何利用Pandas讀取Excel中的數(shù)據(jù)?1、打開電腦,在桌面鼠標右鍵選擇新建excel工作表;接著打開工作表,在sheet1插入一個表格。2、然后在excel表格sheet2,插入另
Python中如何利用Pandas讀取Excel中的數(shù)據(jù)?
1、打開電腦,在桌面鼠標右鍵選擇新建excel工作表;接著打開工作表,在sheet1插入一個表格。
2、然后在excel表格sheet2,插入另一個表格數(shù)據(jù)。
3、雙擊打開pycharm工具,新建python文件,導(dǎo)入pandas包;調(diào)用read_excel()方法讀取excel文件數(shù)據(jù)。
4、保存代碼并運行python文件,結(jié)果出現(xiàn)了報錯,缺少xlrd包。
5、點擊File菜單,選擇Settings,找到項目對應(yīng)的Project Interpreter,安裝xlrd。
6、安裝完畢后,再次運行代碼,可以查看到控制臺打印出excel文件數(shù)據(jù)。