how to read mixed from multiple csv file

2013-08-24 Thread Jia Hu
Hi, My 20 csv files has string header, and first two columns are string (e.g., 1999-01-02, 01:00:00) among the 50 columns. Other columns store numerical values (int, or float) I need to do data analysis for these data. For example, extract the each month data from each of the cvs files (each c

numpy installation

2010-07-24 Thread Jia Hu
Hello: I tried to install numpy 1.4.1 from source under ubuntu following instruction at http://docs.scipy.org/doc/numpy/user/install.html I type "" python setup.py build –help-fcompiler "" and it says gnu95 is found. Then I run ""python setup.py build –fcompiler=gnu95"". There is error. Does any

Re: why is this group being spammed?

2010-07-24 Thread Jia Hu
I subscribe for this mailing list at http://mail.python.org/mailman/listinfo/python-list On Sat, Jul 24, 2010 at 3:22 PM, Jia Hu wrote: > Hi, can I subscribe this by gmail? > > On Sat, Jul 24, 2010 at 3:16 PM, Mark Lawrence wrote: > >> On 24/07/2010 18:01, Dennis Lee Bieber wr

Re: why is this group being spammed?

2010-07-24 Thread Jia Hu
Hi, can I subscribe this by gmail? On Sat, Jul 24, 2010 at 3:16 PM, Mark Lawrence wrote: > On 24/07/2010 18:01, Dennis Lee Bieber wrote: > >> On Sat, 24 Jul 2010 07:32:30 -0700 (PDT), "be.krul" >> declaimed the following in gmane.comp.python.general: >> >> But maybe owner of this group do no care

Re: How to pass the shell in Python

2010-07-20 Thread Jia Hu
sub = subprocess.Popen("shell command", shell=True) If you have to wait the shell finishes its commands and then continue the next Python code. You can add another line: sub.wait() On Tue, Jul 20, 2010 at 7:57 AM, S.Selvam wrote: > > > On Tue, Jul 20, 2010 at 7:11 AM, Ranjith Kumar wrote: > >>

Re: why is this group being spammed?

2010-07-19 Thread Jia Hu
Hi noboby: How can you make the current email and name hidden? On Mon, Jul 19, 2010 at 2:42 PM, Nobody wrote: > On Sun, 18 Jul 2010 15:18:59 -0700, sturlamolden wrote: > > >> why is this group being spammed? > > > > There used to be bots that issued cancel messages against spam, but I > > don't

Re: why is this group being spammed?

2010-07-19 Thread Jia Hu
I use Gmail. When I receive spams, I will click "Report Spam". In addition, I will not empty the spam box of my email immediately. When I receive about 25 spams, I will click "Filter messages like these" to filter all the spams and let gmail automatically delete them. On Mon, Jul 19, 2010 at 1:

Re: timing

2010-07-16 Thread Jia Hu
Thank you, it is so straightforward. On Fri, Jul 16, 2010 at 9:58 PM, Chris Rebert wrote: > On Fri, Jul 16, 2010 at 5:52 PM, Jia Hu wrote: > > Hello: > > > > If I want to calculate the runtime of a section of a program. How can I > do > > it? > > Taking

timing

2010-07-16 Thread Jia Hu
Hello: If I want to calculate the runtime of a section of a program. How can I do it? Thank you, Jia -- http://mail.python.org/mailman/listinfo/python-list

Re: write a .txt file

2010-07-13 Thread Jia Hu
On Tue, Jul 13, 2010 at 3:17 AM, Cameron Simpson wrote: > On 13Jul2010 02:46, Jia Hu wrote: > | Hi: > | > | Do you mean the following code? > | > | #!/usr/bin/python > | # OS: Ubuntu > | import subprocess > | fileName = open ('final.txt', 'a'

Re: write a .txt file

2010-07-12 Thread Jia Hu
ssible that I put the fileName.flush() in a wrong position ? I am new to Python and do not quite understand the "flush" concept. Thank you. Jia > On Tue, Jul 13, 2010 at 2:16 AM, Cameron Simpson wrote: > >> On 12Jul2010 21:28, Jia Hu wrote: >> | I have a probl

Re: write a .txt file

2010-07-12 Thread Jia Hu
If I change "'echo "hello">> final.txt" to "ls -a >> final.txt" and add fileName.close() before subprocess. The result is still like: 12 25 9 85 25 12 # list of files . How can I put the list before the number list 85 25 12? Thank you.

write a .txt file

2010-07-12 Thread Jia Hu
Hello: I have a problem about how to generate a specific.txt file. I use the following code: #!/usr/bin/python # OS: Ubuntu import subprocess fileName = open ('final.txt', 'a') fileName.write ('%s %s %s \n' % (12,25,9)) desLrr = subprocess.Popen('echo "hello" >> final.txt ', shell=True) fileName

Re: how to delete "\n"

2010-07-12 Thread Jia Hu
list to numerical list? Thank you for help. On Mon, Jul 12, 2010 at 4:45 PM, Chris Rebert wrote: > On Mon, Jul 12, 2010 at 1:27 PM, Jia Hu wrote: > > Hi, I just want to delete "\n" at each line. My operating system is > ubuntu > > 9.1. The code is as follows >

how to delete "\n"

2010-07-12 Thread Jia Hu
Hi, I just want to delete "\n" at each line. My operating system is ubuntu 9.1. The code is as follows #!/usr/bin/python import string fileName=open('Direct_Irr.txt', 'r') # read file directIrr = fileName.readlines() fileName.close() for line in directIrr: line.rstrip('\n') print directIrr