File "X:/PyCharm 2018.1/lianxi/fields/importdata.py", line 33, in curs.execute(query,vals) sqlite3.ProgrammingError: You must not use 8-bit bytestrings unless you use a text_factory that can interpret 8-bit bytestrings (like text_factory = str). It
Private Sub CommandButton1_Click() Dim addIn As COMAddIn Dim automationObject As Object Set addIn = Application.COMAddIns("ExcelImportData") Set automationObject = addIn.Object automationObject.ImportData End Sub Private Sub CommandButton2_Click()
假设txt文件为:
一、matlab代码
data=importdata('data.txt');
xlswrite('data.xls',data);
二、python代码
利用pandas的DataFrame输出为Excel【但是输出会有索引】
结果为:
import numpy as np
import pandas as pd
def getData(path):
with open(path, 'r') as file:
data = []
for line in f