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


Groups > comp.lang.python > #37423

Re: Increase value in hash table

Path csiph.com!v102.xanadu-bbs.net!xanadu-bbs.net!news.albasani.net!newsfeed.freenet.ag!news2.euro.net!newsgate.cistron.nl!newsgate.news.xs4all.nl!post.news.xs4all.nl!not-for-mail
Return-Path <chris@rebertia.com>
X-Original-To python-list@python.org
Delivered-To python-list@mail.python.org
X-Spam-Status OK 0.120
X-Spam-Level *
X-Spam-Evidence '*H*': 0.78; '*S*': 0.02; 'output': 0.04; '22,': 0.09; 'cc:addr:python-list': 0.10; 'wrote:': 0.17; 'jan': 0.18; 'email addr:gmail.com&gt;': 0.20; 'cc:2**0': 0.23; '&gt;': 0.23; 'cc:addr:python.org': 0.25; 'header:In-Reply-To:1': 0.25; 'message-id:@mail.gmail.com': 0.27; 'skip:& 10': 0.29; 'url:python': 0.32; 'file': 0.32; 'received:google.com': 0.34; 'pm,': 0.35; 'table': 0.35; 'url:org': 0.36; 'url:library': 0.36; 'data': 0.37; 'subject:: ': 0.38; 'url:docs': 0.38; 'header:Received:5': 0.40; 'frequency': 0.65; '2013': 0.84; 'construct': 0.84; 'sender:addr:chris': 0.84; 'subject:Increase': 0.84; 'subject:value': 0.84; 'url:counter': 0.84
DKIM-Signature v=1; a=rsa-sha256; c=relaxed/relaxed; d=rebertia.com; s=google; h=mime-version:x-received:sender:in-reply-to:references:date :x-google-sender-auth:message-id:subject:from:to:cc:content-type; bh=q10aDULbhibD37N2sUcql6w9PAGYzE7W3RZwX3FEjvU=; b=DrdisejwE1msHAHhKksyMV7DVDvCJch6+uJenrE421v4+p/2ylUscYuZFn0AY3iWPo HJOUCe+bcYS2RKTU4jSZLv9/U8XX+FsInd7XzfGfmib+6kRA5+BJK2wTWIA4onT2T8/e mOm1KTlGHy2XzV1E4o6E4tLfgoYKVxalFk9tU=
X-Google-DKIM-Signature v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20120113; h=mime-version:x-received:sender:in-reply-to:references:date :x-google-sender-auth:message-id:subject:from:to:cc:content-type :x-gm-message-state; bh=q10aDULbhibD37N2sUcql6w9PAGYzE7W3RZwX3FEjvU=; b=SZQQ9t5ifrgiaBTpvIAY+EV4KRhI63eHqajJsKGRtjq4WA12LtMRfFUf8wx3iTlDJH QinXPZwikgpwXSh/e08bUfdGljlRXzYUqw9zettJpKof5BaXWqnki0CVOo9ArrJ3wJFD by6t7VKShGbALmvWn4De4rljV40vMQunsCit8Al596W3kxyjKBpyEKgia9xnXTxK288W yO/w4vxek09W1CswyT9IbP8GBfQSBD6tHAFQLGENqIL4o3AXGco2lEfWSe4oMkKvhajT nDxctWmcrqKpuWSqIHL7NxaoTcTTCp3WDsOlNj9xSmwq/fqZF4z/1Nzx+EmTITxERmVo Eg8Q==
MIME-Version 1.0
X-Received by 10.50.187.230 with SMTP id fv6mr14062491igc.48.1358926496246; Tue, 22 Jan 2013 23:34:56 -0800 (PST)
Sender chris@rebertia.com
In-Reply-To <32d316a1-8551-4cb2-871f-b0a653c7d2f6@u7g2000yqg.googlegroups.com>
References <32d316a1-8551-4cb2-871f-b0a653c7d2f6@u7g2000yqg.googlegroups.com>
Date Tue, 22 Jan 2013 23:34:56 -0800
X-Google-Sender-Auth aT7bywAdLZNXYKpL-84G9-GHCc8
Subject Re: Increase value in hash table
From Chris Rebert <clp2@rebertia.com>
To moonhkt <moonhkt@gmail.com>
Content-Type multipart/alternative; boundary=14dae9340e1115acf104d3efbb44
X-Gm-Message-State ALoCoQmxMp3VLC+0SiWz1QgXVu/3IFHTqCUqYqEoo5QVAxxbQCiyEc07mqfWGZVrddRIobSAFyX6
Cc Python <python-list@python.org>
X-BeenThere python-list@python.org
X-Mailman-Version 2.1.15
Precedence list
List-Id General discussion list for the Python programming language <python-list.python.org>
List-Unsubscribe <http://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 <http://mail.python.org/mailman/listinfo/python-list>, <mailto:python-list-request@python.org?subject=subscribe>
Newsgroups comp.lang.python
Message-ID <mailman.870.1358926498.2939.python-list@python.org> (permalink)
Lines 57
NNTP-Posting-Host 2001:888:2000:d::a6
X-Trace 1358926498 news.xs4all.nl 6945 [2001:888:2000:d::a6]:55478
X-Complaints-To abuse@xs4all.nl
Xref csiph.com comp.lang.python:37423

Show key headers only | View raw


[Multipart message — attachments visible in raw view] - view raw

On Jan 22, 2013 11:31 PM, "moonhkt" <moonhkt@gmail.com> wrote:
>
> Hi Al
>
> I have Data file have below
>
> Data file
> V1
> V2
> V3
> V4
> V4
> V3
>
> How to using count number of data ?
>
> Output
> V1 = 1
> V2 = 1
> V3 =2
> V4 = 2

Construct a frequency table using collections.Counter:

http://docs.python.org/2.7/library/collections.html#collections.Counter

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


Thread

Increase value in hash table moonhkt <moonhkt@gmail.com> - 2013-01-22 23:26 -0800
  Re: Increase value in hash table Chris Rebert <clp2@rebertia.com> - 2013-01-22 23:34 -0800
    Re: Increase value in hash table moonhkt <moonhkt@gmail.com> - 2013-01-23 01:23 -0800
  Re: Increase value in hash table Oscar Benjamin <oscar.j.benjamin@gmail.com> - 2013-01-23 10:12 +0000
    Re: Increase value in hash table Steven D'Aprano <steve+comp.lang.python@pearwood.info> - 2013-01-23 10:47 +0000
      Multiple postings [was Re: Increase value in hash table] Steven D'Aprano <steve+comp.lang.python@pearwood.info> - 2013-01-23 21:54 +1100
        Re: Multiple postings [was Re: Increase value in hash table] rusi <rustompmody@gmail.com> - 2013-01-23 06:00 -0800
    Re: Increase value in hash table Steven D'Aprano <steve+comp.lang.python@pearwood.info> - 2013-01-23 10:46 +0000
    Re: Increase value in hash table Steven D'Aprano <steve+comp.lang.python@pearwood.info> - 2013-01-23 10:46 +0000
    Re: Increase value in hash table Steven D'Aprano <steve+comp.lang.python@pearwood.info> - 2013-01-23 10:47 +0000
  Re: Increase value in hash table moonhk <moonhkt@gmail.com> - 2013-01-23 23:33 +0800
    Re: Increase value in hash table moonhkt <moonhkt@gmail.com> - 2013-01-23 07:39 -0800
      Re: Increase value in hash table Dave Angel <d@davea.name> - 2013-01-23 17:35 -0500
  Re: Increase value in hash table Vito De Tullio <vito.detullio@gmail.com> - 2013-01-24 19:30 +0100

csiph-web