“Python Baca XLS” Kode Jawaban

Python Baca XLS

# credit to Stack Overflow user in the source link

import pandas as pd

# use r before absolute file path
xls = pd.ExcelFile(r"yourfilename.xls")  

# 2 is the sheet number+1 thus 
# if the file has only 1 sheet write 0 in paranthesis
sheetX = xls.parse(2) 
var1 = sheetX['ColumnName']

# 1 is the row number
print(var1[1]) 
wolf-like_hunter

Baca file XLS di Python

# Incase you are searchinig for xls files specifically

import pandas as pd

data = pd.read_excel('yourfilename.xls',sheet_name='yoursheetname')

data.head(50)
Wrong case

Jawaban yang mirip dengan “Python Baca XLS”

Pertanyaan yang mirip dengan “Python Baca XLS”

Lebih banyak jawaban terkait untuk “Python Baca XLS” di Python

Jelajahi jawaban kode populer menurut bahasa

Jelajahi bahasa kode lainnya