Path: csiph.com!fu-berlin.de!uni-berlin.de!not-for-mail From: Joel Goldstick 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 12:08:47 -0400 Lines: 18 Message-ID: References: <75e5d8dc-e15b-4350-95e8-490abd4aa14f@googlegroups.com> Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable X-Trace: news.uni-berlin.de uZlAC51FbL8i/3QDNfCNMww3l4f4424h/i3r8rpNBsxQ== Return-Path: X-Original-To: python-list@python.org Delivered-To: python-list@mail.python.org X-Spam-Status: OK 0.008 X-Spam-Evidence: '*H*': 0.98; '*S*': 0.00; 'column': 0.07; 'subject:file': 0.07; 'cc:addr:python-list': 0.09; 'csv': 0.09; 'subject:CSV': 0.09; 'received:209.85.218': 0.10; 'url:blog': 0.10; 'python.': 0.11; 'subject:python': 0.14; 'subject: \n ': 0.15; 'value.': 0.15; '2016': 0.16; 'advance!': 0.16; 'received:io': 0.16; 'received:psf.io': 0.16; 'wrote:': 0.16; 'cc:2**0': 0.20; 'cc:addr:python.org': 0.20; 'header:In-Reply- To:1': 0.24; 'wondering': 0.25; 'entered': 0.27; 'message- id:@mail.gmail.com': 0.27; 'have,': 0.27; 'function': 0.28; 'values': 0.28; 'url:mailman': 0.30; 'code': 0.30; 'useful': 0.33; 'url:python': 0.33; 'url:listinfo': 0.34; 'tue,': 0.34; 'file': 0.34; 'received:google.com': 0.35; 'url:org': 0.36; 'created': 0.36; 'lines': 0.36; 'received:209.85': 0.36; 'data.': 0.36; 'pm,': 0.36; 'subject:: ': 0.37; 'thanks': 0.37; 'received:209': 0.38; 'names': 0.38; 'does': 0.39; 'subject:the': 0.39; 'url:mail': 0.40; 'your': 0.60; 'show': 0.62; 'url:info': 0.71; '26,': 0.72; 'subject:any': 0.84; 'subject:value': 0.84; 'to:none': 0.91; 'joel': 0.91 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:in-reply-to:references:date:message-id:subject:from:cc :content-transfer-encoding; bh=m/R4JGJdXL5IA7+mlDED7ZVm8thsQQ+skO8C+HWnAoc=; b=J8wLyS8BGsvUh0wOfoZy/qFD7sxH1/jxzSdsCWEvKMk1Uz1NPYJ7NiTub8Vn/NsPRE gYDXa+oBvNJbWYPVgWmehQASzZLsH9nzfnNKuWbqvvv41g5Xti99stwzQHF0fklU5bfy gI3NoJ5T2GrI6JcqZ6PmiqKS/O32SodWn0GWH06aKH8Ug6ibRbxEnqFP53iiSQoPFXou eiL00HD9UV4Oc/aWKIWzkbamKdNZz+dvPCrGUdDXuK56bL+2lQbjNHcnZJPP1jYX2TbP tPDhl+NRX7EVbUARERmiqUxgHyI44icMVr61Uzh3oCBSPmVphxwOmqGFfj4fbWt9/GFW 3cbw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:mime-version:in-reply-to:references:date :message-id:subject:from:cc:content-transfer-encoding; bh=m/R4JGJdXL5IA7+mlDED7ZVm8thsQQ+skO8C+HWnAoc=; b=eKZR5GCjvcyj9Dr7vhEJgXU2pS9lc4Mv4sR9DVvQeTd16yWVzpp5YJTmnHqCa0cMvI Yar3VUoeD//DyRt5CxudAVoc/0M2wTVuaETQ0OyODYlzV44fgSFolFrT5Y5EgDHIsTCR jiglI615mxBOqjhur1dDr2clZtAzZbVeFAFXzcRxNe4EJ67XOKtwPJHJrMR5XfqOi2mS 2P8cehQXtXKhK0PR8XAstF+yrUfeIXwn5qfwFDySfFGha+UhtlNoGSQRe24Gxm3FaXXS e515C5QlgEEEsx+VNDBIJH80CqJkrUc4FMoSV7iWyDilLiEJezD/ILewEzVLX+cQAQ+F cp0g== X-Gm-Message-State: AOPr4FVN7Q/paNI8wtQMONBviHxxb5KDpUWPq0nIjW2uk+VObxT1PVbmsXEMrFJV6WNeE8hWsf8Kk4+WvQqgaA== X-Received: by 10.202.202.193 with SMTP id a184mr1407192oig.177.1461686927945; Tue, 26 Apr 2016 09:08:47 -0700 (PDT) In-Reply-To: <75e5d8dc-e15b-4350-95e8-490abd4aa14f@googlegroups.com> X-BeenThere: python-list@python.org X-Mailman-Version: 2.1.22 Precedence: list List-Id: General discussion list for the Python programming language List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-Mailman-Original-Message-ID: X-Mailman-Original-References: <75e5d8dc-e15b-4350-95e8-490abd4aa14f@googlegroups.com> Xref: csiph.com comp.lang.python:107663 On Tue, Apr 26, 2016 at 12:01 PM, wrote: > I am wondering how to make my code function so it does not allow any of t= he same values to be entered into a column in my CSV file created through p= ython. So I need to read into the CSV file and check if any names have alre= ady 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 Show your code and a few lines of your file with useful data. Show the result you want --=20 Joel Goldstick http://joelgoldstick.com/blog http://cc-baseballstats.info/stats/birthdays