Re: [Tutor] print date and skip any repeats

2014-10-02 Thread Dave Angel
On 09/24/2014 05:19 AM, questions anon wrote: Ok, I am continuing to get stuck. I think I was asking the wrong question so I have posted the entire script (see below). What I really want to do is find the daily maximum for a dataset (e.g. Temperature) that is contained in monthly netcdf files whe

Re: [Tutor] print date and skip any repeats

2014-09-24 Thread questions anon
Ok, I am continuing to get stuck. I think I was asking the wrong question so I have posted the entire script (see below). What I really want to do is find the daily maximum for a dataset (e.g. Temperature) that is contained in monthly netcdf files where the data are separated by hour. The major ste

Re: [Tutor] print date and skip any repeats

2014-09-23 Thread Dave Angel
Please post in text mode, not html. questions anon Wrote in message: > > lastdate=all_the_dates[1] > onedateperday.append(lastdate) > print onedateperday > for date in all_the_dates: > if date !=lastdate: > lastdate=date > onedateperday.append(lastdate) There are a numbe

Re: [Tutor] print date and skip any repeats

2014-09-22 Thread questions anon
Thank you for your help. Using your feedback and adding the input dates and the output dates into lists. It seems to work although I am not sure if this is the correct/fastest/pythonic way to go about it. As I said it works... I have pasted below if anyone else needs something similar thanks for yo

Re: [Tutor] print date and skip any repeats

2014-09-17 Thread Cameron Simpson
On 17Sep2014 19:21, questions anon wrote: I think this should be simple but I can't find the right commands. I have a date for each hour for a whole month (and more) and I would like to write a loop that prints each date that is different but skips the dates that are the same. for i in date: p

Re: [Tutor] print date and skip any repeats

2014-09-17 Thread Peter Otten
questions anon wrote: > I think this should be simple but I can't find the right commands. > > I have a date for each hour for a whole month (and more) and I would like > to write a loop that prints each date that is different but skips the > dates that are the same. > > for i in date: > print i

[Tutor] print date and skip any repeats

2014-09-17 Thread questions anon
Hi Tutor, I think this should be simple but I can't find the right commands. I have a date for each hour for a whole month (and more) and I would like to write a loop that prints each date that is different but skips the dates that are the same. for i in date: print i and then skip i until differ