""" 功能:将Excel数据导入到MySQL数据库 """ import xlrd import MySQLdb # Open the workbook and define the worksheet book = xlrd.open_workbook("pytest.xls") sheet = book.sheet_by_name("source") #建立一个MySQL连接 database = M
首先导入scipy的包 from scipy.io import loadmat 然后读取 m = loadmat("F:/__identity/activity/论文/data/D001.mat") 注意这里m是一个dict数据结构 >>> m {'__header__': b'MATLAB 5.0 MAT-file, Platform: PCWIN, Created on: Mon Aug 15 22:16:43 2011', '__globals__': [],