Re: [Tutor] HELP!!

2016-01-12 Thread Alan Gauld
On 12/01/16 20:36, Chelsea G wrote: > data = defaultdict(list) > > class dictionary: >with open ('weekly_20160102.csv', 'rb') as f: > reader = csv.reader(f) > next(reader, None) > for row in reader: > data[row[2]].append(row[3]) > for key in data.keys(): >

Re: [Tutor] HELP!!

2016-01-12 Thread Danny Yoo
On Tue, Jan 12, 2016 at 12:36 PM, Chelsea G wrote: > So I am importing a csv file to textfile and the first column is product > names and the second is a description of each. I am trying to find the sum > of all descriptions using sum(c.values)). Here is my code so far: [code cut] Code is someti

Re: [Tutor] HELP!!

2016-01-12 Thread Joel Goldstick
On Tue, Jan 12, 2016 at 3:36 PM, Chelsea G wrote: > So I am importing a csv file to textfile and the first column is product > names and the second is a description of each. I am trying to find the sum > of all descriptions using sum(c.values)). Here is my code so far: > > import csv > import jso

[Tutor] HELP!!

2016-01-12 Thread Chelsea G
So I am importing a csv file to textfile and the first column is product names and the second is a description of each. I am trying to find the sum of all descriptions using sum(c.values)). Here is my code so far: import csv import json import sys #from sys import argv from collections import defa

Re: [Tutor] Fwd: RE: Thread output to GUI Text Field

2016-01-12 Thread Alan Gauld
On 12/01/16 09:44, Alan Gauld wrote: > You didn't mention earlier that you were using threads! > That significantly complicates matters. Apologies, I just noticed that the subject line does, although it wasn't clear that you were trying to output between threads. > I have found that I need to us

[Tutor] Fwd: RE: Thread output to GUI Text Field

2016-01-12 Thread Alan Gauld
Forwarding to list. Please use Reply-All or Rely to List when responding to tutor messages. You didn't mention earlier that you were using threads! That significantly complicates matters. Forwarded Message Subject:RE: [Tutor] Thread output to GUI Text Field Date: Tue