Show Menu
Cheatography

Numpy CheatSheet Cheat Sheet (DRAFT) by

numpy

This is a draft cheat sheet. It is a work in progress and is not finished yet.

Install & Useage

Code
Comment
easy_i­nstall xlrd
from xlrd import open_w­orkbook
wb = open_w­ork­boo­k('­dem­o.xls')
wb.nsheets
Number of sheets
wb.she­et_­by_­ind­ex(­she­et_­index)
Get sheet by index
wb.she­et_­by_­nam­e(s­hee­t_name)
Get sheet by name
wb.she­ets()
Get all sheets
sheet = wb.she­et_­by_­ind­ex(0)
Get the first sheet
sheet.name
Name of sheet
sheet.n­rows
Number of row of sheet
sheet.n­cols
Number of columns of sheet
cell = sheet.c­el­l(0,0)
Get the first cell of sheet
cell.value
Get the value of cell
 

Type

xlrd.X­L_C­ELL­_TEXT
Text
xlrd.X­L_C­ELL­_NUMBER
Number
xlrd.X­L_C­ELL­_DATE
Date
sdfsfas