Gmail Calendar Documents Reader Web more »
Recently Visited Groups | Help | Sign in
Google Groups Home
using csv dictreader in python
There are currently too many topics in this group that display first. To make this topic appear first, remove this option from another topic.
There was an error processing your request. Please try again.
flag
  1 message - Collapse all  -  Translate all to Translated (View all originals)
The group you are posting to is a Usenet group. Messages posted to this group will make your email address visible to anyone on the Internet.
Your reply message has not been sent.
Your post was successful
 
From:
To:
Cc:
Followup To:
Add Cc | Add Followup-to | Edit Subject
Subject:
Validation:
For verification purposes please type the characters you see in the picture below or the numbers you hear by clicking the accessibility icon. Listen and type the numbers you hear
 
Johann Spies  
View profile  
 More options Nov 4, 9:36 pm
Newsgroups: comp.lang.python
From: Johann Spies <jsp...@sun.ac.za>
Date: Wed, 4 Nov 2009 12:36:01 +0200
Local: Wed, Nov 4 2009 9:36 pm
Subject: Re: using csv dictreader in python

On Wed, Nov 04, 2009 at 01:25:16PM +0530, Siva Subramanian wrote:
> This only gets me the following output

> {'FieldName1': '4', 'FieldName2': '0.00', 'FieldName3':
> '4001433', 'FieldName4': '759'}

> 1. How do i access the 4, 0.00, ... the values ?
>>> a= {'FieldName1': '4', 'FieldName2': '0.00', 'FieldName3': '4001433', 'FieldName4': '759'}
>>> a

{'FieldName4': '759', 'FieldName1': '4', 'FieldName3': '4001433', 'FieldName2': '0.00'}
>>> a['FieldName3']

'4001433'

> 2. How do i compare it with another csv file ?

If you have the values in one file, get the values in the other one
and then compare.  I am not sure I understand what is the problem here.

Regards
Johann
--
Johann Spies          Telefoon: 021-808 4599
Informasietegnologie, Universiteit van Stellenbosch

     "Train up a child in the way he should go: and when he
      is old, he will not depart from it."   Proverbs 22:6


    Reply    Reply to author    Forward  
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
End of messages
« Back to Discussions « Newer topic     Older topic »

Create a group - Google Groups - Google Home - Terms of Service - Privacy Policy
©2009 Google