不废话,看代码
def read_excel2(path):
data_xls = pd.io.excel.ExcelFile(path)
data={}
print(data_xls.sheet_names)
for name in data_xls.sheet_names:
df=pd.read_excel(data_xls,sheet_name=name,header=None , usecols = [1,3,5])
data[name]=df
print("df = ",df , type(df))
if df.empty:
continue
mm = np.array(df)
ss = mm.transpose()
读取csv按行来读
with open('3.csv','r') as csvfile:
reader = csv.reader(csvfile)
rows = [row for row in reader]
print(rows)
for i in range(len(rows)):
print(rows[i])
欢迎分享,转载请注明来源:内存溢出
评论列表(0条)