這是xls文件:如何選擇所有具有相同名稱的行,而不僅僅是第一個?
moto 5 2 45
moto 2 4 43
coche 8 54 12
coche 43 21 6
coche 22 14 18
這是pyexcel庫工作代碼:
import pyexcel as pe
data = pe.get_sheet(file_name="vehiculo.xls")
sheet = pe.Sheet(data, name_rows_by_column=0)
sheet.row.select(['coche'])
sheet.save_as("output.xls")
它只返回最前一頁列名爲 '科切':
coche 8 54 12
我想要所有名稱爲「coche」的行。
有什麼想法? 感謝