Search
 
SCRIPT & CODE EXAMPLE
 

PYTHON

python read 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]) 
Comment

read xls file in 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)
Comment

PREVIOUS NEXT
Code Example
Python :: converting a csv into python list 
Python :: python alfabet 
Python :: django reverse 
Python :: installing django celery beat pip 
Python :: import numpy Illegal instruction (core dumped) 
Python :: remove word from string python 
Python :: get next multiple of a number 
Python :: how to take list of float as input in python 
Python :: name exit not defined python 
Python :: python extract specific columns from pandas dataframe 
Python :: python count nested keys 
Python :: insert image to jupyter notebook 
Python :: how to write to an output file in pytion 
Python :: yesterday in python 
Python :: django import model from another app 
Python :: python two while loops at same time 
Python :: python split string capital letters 
Python :: beautiful soup 4 python 
Python :: trigonometry in python 
Python :: save dataframe to csv without index 
Python :: LookupError: unknown encoding: idna python 
Python :: how to add two different times in python 
Python :: float number field django models 
Python :: click js selenium python 
Python :: cv2 videocapture nth frame 
Python :: df count missing values 
Python :: stop a subprocess python 
Python :: install qt python 
Python :: import models 
Python :: python moving average of list 
ADD CONTENT
Topic
Content
Source link
Name
5+1 =