Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > comp.lang.python > #107696

RE: Howw to prevent the duplication of any value in a column within a CSV file (python)

Path csiph.com!fu-berlin.de!uni-berlin.de!not-for-mail
From Joaquin Alzola <Joaquin.Alzola@lebara.com>
Newsgroups comp.lang.python
Subject RE: Howw to prevent the duplication of any value in a column within a CSV file (python)
Date Tue, 26 Apr 2016 16:07:19 +0000
Lines 24
Message-ID <mailman.134.1461717639.32212.python-list@python.org> (permalink)
References <75e5d8dc-e15b-4350-95e8-490abd4aa14f@googlegroups.com> <HE1PR07MB1356CCDD91381717D3F7EF93F0630@HE1PR07MB1356.eurprd07.prod.outlook.com>
Mime-Version 1.0
Content-Type text/plain; charset="us-ascii"
Content-Transfer-Encoding quoted-printable
X-Trace news.uni-berlin.de PuQ5LqmcSMu3bXH88tpqcQUeAGre/qHajq1ftcX+dn7A==
Return-Path <Joaquin.Alzola@lebara.com>
X-Original-To python-list@python.org
Delivered-To python-list@mail.python.org
X-Spam-Status OK 0.012
X-Spam-Evidence '*H*': 0.98; '*S*': 0.00; 'column': 0.07; 'subject:file': 0.07; 'csv': 0.09; 'subject:CSV': 0.09; 'python.': 0.11; 'subject:python': 0.14; 'message-----': 0.15; 'subject: \n ': 0.15; 'value.': 0.15; '(python)': 0.16; '2016': 0.16; 'advance!': 0.16; 'privilege.': 0.16; 'received:io': 0.16; 'received:psf.io': 0.16; 'skip:[ 60': 0.16; 'pfxlen:0': 0.18; 'prevent': 0.20; 'to:name:python-list@python.org': 0.20; 'to:2**1': 0.21; 'import': 0.24; 'header:In-Reply-To:1': 0.24; 'wondering': 0.25; 'entered': 0.27; 'have,': 0.27; 'function': 0.28; 'values': 0.28; 'dictionary': 0.29; 'url:mailman': 0.30; 'code': 0.30; 'url:python': 0.33; 'skip:- 10': 0.34; 'url:listinfo': 0.34; 'file': 0.34; 'sent:': 0.35; 'subject:': 0.35; 'but': 0.36; 'url:org': 0.36; 'created': 0.36; 'email addr:python.org': 0.36; 'to:addr:python-list': 0.36; 'subject:: ': 0.37; 'received:10': 0.37; 'thanks': 0.37; 'charset:us-ascii': 0.37; 'names': 0.38; 'does': 0.39; 'subject:the': 0.39; 'from:': 0.39; 'url:mail': 0.40; 'to:addr:python.org': 0.40; 'email addr:gmail.com': 0.62; 'within': 0.64; 'contact': 0.66; 'python- list': 0.66; 'email name:python-list': 0.67; 'subject': 0.70; 'disclose': 0.71; 'duplication': 0.84; 'subject:any': 0.84; 'subject:value': 0.84
DKIM-Signature v=1; a=rsa-sha256; c=relaxed/relaxed; d=lebara.onmicrosoft.com; s=selector1-lebara-com; h=From:To:Date:Subject:Message-ID:Content-Type:MIME-Version; bh=ExIi7ajDaZf8sIijO6DmYx9CshiH4jBU8jSTT/VlQyo=; b=f+Iu2gwzvhMlQ2S3ErVklO4QBhISD0zOsnJqZQUkXHN3u/3unH+kLY/cshg1sb72G0u6zBLbHlXFLAqoSYgOkr7XWiyRktDujb/E90t1+t6OcuOh91PYRPUUbkG7mx/FAu/AXJtFQEifR6Dt9I9HCJPY+6fcSB2TchbsjdEyB5Y=
Thread-Topic Howw to prevent the duplication of any value in a column within a CSV file (python)
Thread-Index AQHRn9VtgXv+FqSVMUycropIKX1MNZ+ca2xw
In-Reply-To <75e5d8dc-e15b-4350-95e8-490abd4aa14f@googlegroups.com>
Accept-Language en-GB, en-US
Content-Language en-US
X-MS-Has-Attach
X-MS-TNEF-Correlator
authentication-results gmail.com; dkim=none (message not signed) header.d=none;gmail.com; dmarc=none action=none header.from=lebara.com;
x-originating-ip [165.225.80.110]
x-ms-office365-filtering-correlation-id 6d876438-65f9-4218-df0f-08d36decd842
x-microsoft-exchange-diagnostics 1; HE1PR07MB1354; 5:/dzc0D5PUTidn4ptM7Hi1Z8gedsdFHoFpHNEFpk+HBcDVHTPigld+8BWaUPLtNJ1QnAGJ++opzHo+4WmXPvNVi1Kmf0fK9xJsBYToLI12HgrKMjnPxCv17Ag5Wlpu1JnqKuzq9oOxEweQVKLSkqe8g==; 24:shvCuSZOkFBSare+jfLBJR/m+IRHY9KBx/dEffFOAE/1C48x2vTA1NqY3s+JXFpwGi5HRHK9PyxdKP92lUzRmaDar+RKnxoHpLsPRF7sMNw=; 7:8hBAgJ03PbXwVnw9cxxL9+qtx8d/OYuC3YnavpV7MCbPC6Kx4qCrWxIcEXlaj+fHzfwSdPyVDNpJoAeJip3e+8b8nux7TaXLIWnZvAsdA3JBLIt00izT1sLK+yC50GLKpZ9ZW+EK9/Xo8ZYFbYVDcC+mRHne5B1VTrLjbC5fbHm9ZCwc0l/+QzPb3Z5NAzTr
x-microsoft-antispam UriScan:;BCL:0;PCL:0;RULEID:;SRVR:HE1PR07MB1354;
x-microsoft-antispam-prvs <HE1PR07MB135423DBF0CE57720217A719F0630@HE1PR07MB1354.eurprd07.prod.outlook.com>
x-exchange-antispam-report-test UriScan:;
x-exchange-antispam-report-cfa-test BCL:0; PCL:0; RULEID:(9101521072)(601004)(2401047)(8121501046)(5005006)(10201501046)(3002001); SRVR:HE1PR07MB1354; BCL:0; PCL:0; RULEID:; SRVR:HE1PR07MB1354;
x-forefront-prvs 0924C6A0D5
x-forefront-antispam-report SFV:NSPM; SFS:(10019020)(6009001)(51874003)(9686002)(6116002)(3846002)(189998001)(102836003)(33656002)(1096002)(1220700001)(50986999)(2906002)(76176999)(54356999)(5002640100001)(5003600100002)(81166005)(5001770100001)(76576001)(586003)(92566002)(106116001)(3280700002)(5004730100002)(5008740100001)(3660700001)(107886002)(122556002)(77096005)(19580395003)(19580405001)(2501003)(66066001)(2950100001)(2900100001)(86362001)(10400500002)(87936001)(74316001)(15975445007); DIR:OUT; SFP:1102; SCL:1; SRVR:HE1PR07MB1354; H:HE1PR07MB1356.eurprd07.prod.outlook.com; FPR:; SPF:None; MLV:sfv; LANG:en;
spamdiagnosticoutput 1:23
spamdiagnosticmetadata NSPM
X-OriginatorOrg lebara.com
X-MS-Exchange-CrossTenant-originalarrivaltime 26 Apr 2016 16:07:19.6873 (UTC)
X-MS-Exchange-CrossTenant-fromentityheader Hosted
X-MS-Exchange-CrossTenant-id d7093539-83cd-4991-b1b3-aacef74cf097
X-MS-Exchange-Transport-CrossTenantHeadersStamped HE1PR07MB1354
X-BeenThere python-list@python.org
X-Mailman-Version 2.1.22
Precedence list
List-Id General discussion list for the Python programming language <python-list.python.org>
List-Unsubscribe <https://mail.python.org/mailman/options/python-list>, <mailto:python-list-request@python.org?subject=unsubscribe>
List-Archive <http://mail.python.org/pipermail/python-list/>
List-Post <mailto:python-list@python.org>
List-Help <mailto:python-list-request@python.org?subject=help>
List-Subscribe <https://mail.python.org/mailman/listinfo/python-list>, <mailto:python-list-request@python.org?subject=subscribe>
X-Mailman-Original-Message-ID <HE1PR07MB1356CCDD91381717D3F7EF93F0630@HE1PR07MB1356.eurprd07.prod.outlook.com>
X-Mailman-Original-References <75e5d8dc-e15b-4350-95e8-490abd4aa14f@googlegroups.com>
Xref csiph.com comp.lang.python:107696

Show key headers only | View raw


import csv

Use dictionary {key:value}

-----Original Message-----
From: Python-list [mailto:python-list-bounces+joaquin.alzola=lebara.com@python.org] On Behalf Of peakgraphicz@gmail.com
Sent: 26 April 2016 17:01
To: python-list@python.org
Subject: Howw to prevent the duplication of any value in a column within a CSV file (python)

I am wondering how to make my code function so it does not allow any of the same values to be entered into a column in my CSV file created through python. So I need to read into the CSV file and check if any names have already been entered. If they have, the user must not be allowed to enter this value.

Thanks in advance!
--
https://mail.python.org/mailman/listinfo/python-list
This email is confidential and may be subject to privilege. If you are not the intended recipient, please do not copy or disclose its content but contact the sender immediately upon receipt.

Back to comp.lang.python | Previous | NextPrevious in thread | Find similar | Unroll thread


Thread

Howw to prevent the duplication of any value in a column within a CSV file (python) peakgraphicz@gmail.com - 2016-04-26 09:01 -0700
  Re: Howw to prevent the duplication of any value in a column within a CSV file (python) Joel Goldstick <joel.goldstick@gmail.com> - 2016-04-26 12:08 -0400
    Re: Howw to prevent the duplication of any value in a column within a CSV file (python) Adam Davis <peakgraphicz@gmail.com> - 2016-04-26 10:05 -0700
      Re: Howw to prevent the duplication of any value in a column within a CSV file (python) Dennis Lee Bieber <wlfraed@ix.netcom.com> - 2016-04-26 20:10 -0400
  Re: Howw to prevent the duplication of any value in a column within a CSV file (python) Ian Kelly <ian.g.kelly@gmail.com> - 2016-04-26 10:13 -0600
    Re: Howw to prevent the duplication of any value in a column within a CSV file (python) Adam Davis <peakgraphicz@gmail.com> - 2016-04-26 10:00 -0700
      Re: Howw to prevent the duplication of any value in a column within a CSV file (python) Ian Kelly <ian.g.kelly@gmail.com> - 2016-04-26 13:50 -0600
  Re: Howw to prevent the duplication of any value in a column within a CSV file (python) Adam Davis <peakgraphicz@gmail.com> - 2016-04-26 10:05 -0700
    RE: Howw to prevent the duplication of any value in a column within a CSV file (python) Joaquin Alzola <Joaquin.Alzola@lebara.com> - 2016-04-26 19:05 +0000
    Re: Howw to prevent the duplication of any value in a column within a CSV file (python) Ian Kelly <ian.g.kelly@gmail.com> - 2016-04-26 13:51 -0600
      Re: Howw to prevent the duplication of any value in a column within a CSV file (python) Adam Davis <peakgraphicz@gmail.com> - 2016-04-26 13:07 -0700
        Re: Howw to prevent the duplication of any value in a column within a CSV file (python) Ian Kelly <ian.g.kelly@gmail.com> - 2016-04-26 14:19 -0600
          Re: Private message regarding: Howw to prevent the duplication of any value in a column within a CSV file (python) Ian Kelly <ian.g.kelly@gmail.com> - 2016-05-02 07:47 -0600
        Re: Howw to prevent the duplication of any value in a column within a CSV file (python) MRAB <python@mrabarnett.plus.com> - 2016-04-26 21:23 +0100
          Re: Howw to prevent the duplication of any value in a column within a CSV file (python) Adam Davis <peakgraphicz@gmail.com> - 2016-04-26 23:26 -0700
            Re: Howw to prevent the duplication of any value in a column within a CSV file (python) Chris Angelico <rosuav@gmail.com> - 2016-04-27 16:37 +1000
              Re: Howw to prevent the duplication of any value in a column within a CSV file (python) Adam Davis <peakgraphicz@gmail.com> - 2016-04-27 05:23 -0700
                Re: Howw to prevent the duplication of any value in a column within a CSV file (python) Andrew Ongko <andrew.ongko@gmail.com> - 2016-04-27 19:57 +0700
                Re: Howw to prevent the duplication of any value in a column within a CSV file (python) darnold <darnold992000@yahoo.com> - 2016-04-27 08:49 -0700
  RE: Howw to prevent the duplication of any value in a column within a CSV file (python) Joaquin Alzola <Joaquin.Alzola@lebara.com> - 2016-04-26 16:07 +0000

csiph-web