import pandas
data = pandas.read_excel(excel_path,sheet_name) #excel_path:文件名,sheet_name:表單名
print(data.values) # 把數據轉換爲列表形式data_col = data['data'] # 獲取表格的某列print(data_col)data_cell = data.iloc[1, 2] # 獲取某個單元格print(data_cell)data_rows = data.iloc[[1, 2]] # 獲取指定某幾行print(data_rows.values)data_rows = data.iloc[1] # 獲取指定某行print(data_rows.values)data_x = data.iloc[:, [1, 2]] # 獲取全部行中的第2列和第三列print(data_x)colnums_name = data.columns.values #獲取列名print(colnums_name)data = data.fillna('') #將Nan替換爲其餘值print(data)