hmmm thank you, I obviously need to put some more thought in first.
Thanks for the responses.
On Sat, Sep 8, 2012 at 4:03 PM, Peter Otten <__pete...@web.de> wrote:
> questions anon wrote:
>
> > Hello All, it has been a few months since I have used this and I have
> only
> > just realised I am hav
On 08/09/2012 05:47, questions anon wrote:
Hello All, it has been a few months since I have used this and I have only
just realised I am having problems with leap years. each time I get to
February of a leap year my program stops, therefore I have attributed it to
my code not accounting for leap
questions anon wrote:
> Hello All, it has been a few months since I have used this and I have only
> just realised I am having problems with leap years. each time I get to
> February of a leap year my program stops,
Does it throw an exception (if so, post the traceback) or does it just
terminat
Hello All, it has been a few months since I have used this and I have only
just realised I am having problems with leap years. each time I get to
February of a leap year my program stops, therefore I have attributed it to
my code not accounting for leap years. Is there a simple way to fix my code
(
Thank you for this response it was a tremedous help.
It still took me awhile to work it all out and thought I would post what
worked for me.
Thanks again
GLOBTEMPLATE = r"e:/rainfall-{year}/r{year}{month:02}??.txt"
def accumulate_month(year, month):
files = glob.glob(GLOBTEMPLATE.format(year=
questions anon wrote:
> I have been able to write up what I want to do (using glob) but I am not
> sure how to loop it or simplify it to make the script more efficient.
> I am currently:
> -grouping the same months in a year using glob
> -opening the files in a group and combining the data using a
I have been able to write up what I want to do (using glob) but I am not
sure how to loop it or simplify it to make the script more efficient.
I am currently:
-grouping the same months in a year using glob
-opening the files in a group and combining the data using a list
-finding max, min etc for t
thanks for responding.
Glob and os.walk will work but I would need to type up a separate command
for each month of each year and that doesn't seem very efficient. Is there
a way to make it go through and group txt files with similar filenames
e.g something like:
if fname.endswith('.txt')and fname[0
On 03/04/12 04:59, questions anon wrote:
I have a list of txt files that contain daily rainfall for many years.
They are set out like:
r20110101.txt
r20110102.txt
r20110103.txt
and so on for each day for many years.
MainFolder=r"E:/Rainfalldata/"
outputFolder=r"E:/test/"
for (path, dirs, files)
On Tue, Apr 3, 2012 at 9:29 AM, questions anon wrote:
> I think what I am trying to do is relatively easy but can't get my head
> around how to do it.
> I have a list of txt files that contain daily rainfall for many years. I
> would like to produce a list that contains the year-month and the max,
I think what I am trying to do is relatively easy but can't get my head
around how to do it.
I have a list of txt files that contain daily rainfall for many years. I
would like to produce a list that contains the year-month and the max, min
and mean of rainfall for each month.
My main question at t
11 matches
Mail list logo