Re: [Tutor] How to create dictionaries loadable with import

2013-09-25 Thread Treder, Robert
le. I have it working now. Bob -Original Message- From: Prasad, Ramit [mailto:ramit.pra...@jpmorgan.com] Sent: Tuesday, September 24, 2013 6:23 PM To: Treder, Robert (Research); tutor@python.org Subject: RE: How to create dictionaries loadable with import Treder, Robert wrote: > H

[Tutor] How to create dictionaries loadable with import

2013-09-24 Thread Treder, Robert
Hi Python tutors, I'm fairly new to Python. I'm working with Python v2.7.4 and the nltk package on a couple of text mining projects. I create several dictionaries that are pretty static. Will probably only be updated every or month or every couple of months. I want to turn those dictionaries

Re: [Tutor] reducing lists within list to their set of unique values

2013-05-21 Thread Treder, Robert
plain; charset=UTF-8; format=flowed > > On 21/05/13 08:49, Treder, Robert wrote: >> Hi python folks, >> >> I have a list of lists that looks something like this: >> >> tst = [ [], ['test'], ['t1', 't2'], ['t1', 't1', &#x

[Tutor] reducing lists within list to their set of unique values

2013-05-20 Thread Treder, Robert
Hi python folks, I have a list of lists that looks something like this: tst = [ [], ['test'], ['t1', 't2'], ['t1', 't1', 't2'] ] I want to change the empty sets to a blank string, i.e., '' and the lists with repeat values to the unique set of values. So I have done the following: >>> for

Re: [Tutor] creating a corpus from a csv file

2013-05-13 Thread Treder, Robert
Message: 1 Date: Fri, 03 May 2013 23:05:32 +0100 From: Alan Gauld To: tutor@python.org Subject: Re: [Tutor] creating a corpus from a csv file Message-ID: Content-Type: text/plain; charset=ISO-8859-1; format=flowed On 03/05/13 21:48, Treder, Robert wrote: > I'm very new to python and a

[Tutor] creating a corpus from a csv file

2013-05-03 Thread Treder, Robert
Hi, I'm very new to python and am trying to figure out how to make a corpus from a text file. I have a csv file (actually pipe '|' delimited) where each row corresponds to a different text document. Each row contains a communication note. Other columns correspond to categories of types of com