Re: [Tutor] Collating date data from a csv file

2019-05-14 Thread Dave Hill
Something else to have a look at, but it might have to wait for the longer winter nights :-) On 14/05/2019 06:20, Ben Hancock via Tutor wrote: On Sun, May 12, 2019 at 07:17:53PM +0100, Alan Gauld via Tutor wrote: On 12/05/2019 11:27, Dave Hill wrote: I found out by accident that the Megger P

Re: [Tutor] Collating date data from a csv file

2019-05-13 Thread Ben Hancock via Tutor
On Sun, May 12, 2019 at 07:17:53PM +0100, Alan Gauld via Tutor wrote: On 12/05/2019 11:27, Dave Hill wrote: I found out by accident that the Megger PAT 420 data backup is actually an SQLite database, so that is my route for access. Having played with Python on Raspberry Pi's, I thought I would

Re: [Tutor] Collating date data from a csv file

2019-05-12 Thread Alan Gauld via Tutor
On 12/05/2019 11:27, Dave Hill wrote: > I found out by accident that the Megger PAT 420 data backup is actually > an SQLite database, so that is my route for access. Having played with > Python on Raspberry Pi's, I thought I would explore Python for data > processing, and now, I have a set of p

Re: [Tutor] Collating date data from a csv file

2019-05-12 Thread Dave Hill
Hi David, Firstly, thank you for your reply. One condition of my agreeing to undertake PAT was that I got a PAT machine that stored the data, as I am better at programming than paperwork! I have a Megger PAT 420 which provides a data backup to a USB stick, and thence transfer to my laptop, w

Re: [Tutor] Collating date data from a csv file

2019-05-12 Thread David L Neil
Hi Dave, I also volunteer to do PAT safety testing during my "20% time". Clambering around Snowdonia as a boy, I eschewed* the Rheilffordd yr Wyddfa/SMR in favor of shanks' pony... * OK, I was made to...! For the good of my soul??? On 9/05/19 8:04 AM, Dave Hill wrote: I have a csv file whic

Re: [Tutor] Collating date data from a csv file

2019-05-09 Thread Alan Gauld via Tutor
On 09/05/2019 14:06, Dave Hill wrote: > Thank you, I now have > > defaultdict(, {736697: 10, 736677: 14, 736980: 9, 737109: > 50, 736919: 15, 736652: 19, 736502: 14, 736710: 2, 736674: 6, 736672: 5, > 736933: 2, 736932: 6, 736658: 7, 736671: 5, 736499: 6, 736707: 4, > 737181: 4, 736686: 2, ...

Re: [Tutor] Collating date data from a csv file

2019-05-09 Thread Dave Hill
Thank you, I now have defaultdict(, {736697: 10, 736677: 14, 736980: 9, 737109: 50, 736919: 15, 736652: 19, 736502: 14, 736710: 2, 736674: 6, 736672: 5, 736933: 2, 736932: 6, 736658: 7, 736671: 5, 736499: 6, 736707: 4, 737181: 4, 736686: 2, ... where the first number is the proleptic Gregori

Re: [Tutor] Collating date data from a csv file

2019-05-09 Thread Peter Otten
Cameron Simpson wrote: > On 08May2019 21:04, Dave Hill wrote: >>I have a csv file which details the results of equipment tests, I >>carry out PAT testing as a volunteer at a heriatge railway in N. >>Wales. I want to extract how many items were tested on each test day. >>So far I have generated a

Re: [Tutor] Collating date data from a csv file

2019-05-08 Thread boB Stepp
On Wed, May 8, 2019 at 10:29 PM boB Stepp wrote: > > On Wed, May 8, 2019 at 10:09 PM Cameron Simpson wrote: > > > > A defaultdict is a dict which magicly makes missing elements when they > > get access, using a factory function you supply. Here we're using "int" > > as that factory, as int() retu

Re: [Tutor] Collating date data from a csv file

2019-05-08 Thread boB Stepp
On Wed, May 8, 2019 at 10:09 PM Cameron Simpson wrote: > > A defaultdict is a dict which magicly makes missing elements when they > get access, using a factory function you supply. Here we're using "int" > as that factory, as int() returns zero. Is int() guaranteed to always return zero as Python

Re: [Tutor] Collating date data from a csv file

2019-05-08 Thread Cameron Simpson
On 08May2019 21:04, Dave Hill wrote: I have a csv file which details the results of equipment tests, I carry out PAT testing as a volunteer at a heriatge railway in N. Wales. I want to extract how many items were tested on each test day. So far I have generated a List of test dates, but I am n