0

I am using xlrd to extract individual columns. I am hoping to extract multiple columns from excel into an array so I can use itertools group by function to analyze them.

Is it possible to pull more than one column from excel using xlrd?

2
  • 1
    The short answer I think is yes, but do you have any example code?
    – woot
    Jun 21, 2015 at 17:23
  • I was hoping there would be a generic method for this. I could not find any general way to import multiple columns. I have code to import single columns, but that is not what I am going for.
    – Jac Cook
    Jun 22, 2015 at 21:24

1 Answer 1

1

I think this should help you, Click python documentation for xlrd!

Sheet.row_slice(rowx, start_colx=0, end_colx=None)
Returns a slice of the Cell objects in the given row.

You might just need to loop over it

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.