As a follow up Fred, you have to install the xlrd package to use it.
It helps you interact with an excel file even if you don't have excel installed
on your pc.
Sent from my BlackBerry wireless device from MTN
-Original Message-
From: Fred G
Sender: tutor-bounces+delegbede=dudupay@
Hi Fred,
Here is my attempt to solve your task.
import xlrd
def extract(file_name):
choice_file = xlrd.open_workbook(file_name)
choice_sheet = choice_file.sheet_by_index(0)
gene_dict = {}
for row_num in range(1,choice_sheet.nrows):
row_vals = choice_sheet.row_values(row_
Hey guys,
I want to write a short script that takes from an input excel file w/ a
bunch of rows and columns. The two columns I'm interested in are "high
gains" and "genes." I want the user to write:
>>>Which genes are associated with gains over 20%?
and then I want the script to search through
We are glad to help! If you do have future problems feel free to post again,
but would you mind posting in plain text (or at least without a background)?
Thanks.
Ramit
Ramit Prasad | JPMorgan Chase Investment Bank | Currencies Technology
712 Main Street | Houston, TX 77002
work phone: 713 - 21
Thank you Parsad.
I am using Python 2.7.1+
You are right, looks like optparse is replaced by argparse.
My problem was that I was checking output and not options.output.
cheers,
Mina
On 11-09-20 02:27 PM, Prasad, Ramit wrote:
from optparse import OptionParser
I am not sure what version of Py
> from optparse import OptionParser
I am not sure what version of Python you are using but from 2.7+ optparse is
deprercated. You may want to use that if you can.
> I don't really understand what dest and action in the arguments to
> parser.add_option mean.
Here is your usage:
>>> parser = Op
On Tue, Sep 20, 2011 at 3:21 AM, Mac Ryan wrote:
> On Tue, 20 Sep 2011 10:27:12 +1000
> Steven D'Aprano wrote:
>
>
> > There are three misunderstandings with that statement.
> > [snip]
> > There's also JPype, which claims to give full access to Java
> > libraries in Python.
>
> Now: this was one
On Tue, 20 Sep 2011 10:27:12 +1000
Steven D'Aprano wrote:
> There are three misunderstandings with that statement.
> [snip]
> There's also JPype, which claims to give full access to Java
> libraries in Python.
Now: this was one of the best write-ups on the subject I read. Concise,
clear, docume