Re: [Tutor] Reading .csv data vs. reading an array

2019-07-16 Thread Peter Otten
Chip Wachob wrote: > I tried it anyhow, with this being an example of my source data: > > "Record Length",202,"Points",-0.005640001706,1.6363 > "Sample Interval",5e-09,s,-0.005639996706,1.65291 > "Trigger Point",1128000,"Samples",-0.005639991706,1.65291 > "Trigger Time",0.341197,s,-0.00563998

Re: [Tutor] Reading .csv data vs. reading an array

2019-07-16 Thread David Rock
> On Jul 16, 2019, at 04:31, Alan Gauld via Tutor wrote: > > On 16/07/2019 09:59, Oscar Benjamin wrote: > >>> All true, but sed - once you get used to it! - is easier IMHO >>> and usually faster than Python - it's written in C... >> >> I always think I'll like sed but whenever I actually try t

Re: [Tutor] Reading .csv data vs. reading an array

2019-07-16 Thread Alan Gauld via Tutor
On 16/07/2019 09:59, Oscar Benjamin wrote: >> All true, but sed - once you get used to it! - is easier IMHO >> and usually faster than Python - it's written in C... > > I always think I'll like sed but whenever I actually try to use it I > just can't get the syntax together. Id been using awk

Re: [Tutor] Reading .csv data vs. reading an array

2019-07-16 Thread Oscar Benjamin
On Tue, 16 Jul 2019 at 01:44, Alan Gauld via Tutor wrote: > > On 15/07/2019 21:28, Mats Wichmann wrote: > > > course Python can do that too, by working line-at-a-time, explicitly by > > calling readlines() or implicitly by looping over the file handle. The > > latter looks something like this; > >

Re: [Tutor] Reading .csv data vs. reading an array

2019-07-15 Thread Chip Wachob
Mats, Thank you! So I included the QUOTE_NONNUMERIC to my csv.reader() call and it almost worked. Now, how wonderful that the scope's csv file simply wrote an s for seconds and didn't include quotes. Now Python tells me it can't create a float of s. Of course I can't edit a 4G file in any edit

Re: [Tutor] Reading .csv data vs. reading an array

2019-07-15 Thread Alan Gauld via Tutor
On 15/07/2019 21:28, Mats Wichmann wrote: >> a float of s.  Of course I can't edit a 4G file in any editor that I >> have installed, so I have to work with the fact that there is a bit of >> text in there that isn't quoted. Try sed, it's on most Unix like OS. It doesn't read the entire file into

Re: [Tutor] Reading .csv data vs. reading an array

2019-07-15 Thread Mats Wichmann
On 7/15/19 1:59 PM, Chip Wachob wrote: > Mats, > > Thank you! > > So I included the QUOTE_NONNUMERIC to my csv.reader() call and it almost > worked. > > Now, how wonderful that the scope's csv file simply wrote an s for > seconds and didn't include quotes.  Now Python tells me it can't create >

Re: [Tutor] Reading .csv data vs. reading an array

2019-07-15 Thread Chip Wachob
Oscar and Mats, Thank you for your comments and taking time to look at the snips. Yes, I think I had commented that the avg+trigger was = triggervolts in my original post. I did find that there was an intermediary process which I had forgotten to comment out that was adversely affecting the data

Re: [Tutor] Reading .csv data vs. reading an array

2019-07-15 Thread Mats Wichmann
On 7/15/19 12:35 PM, Chip Wachob wrote: > Oscar and Mats, > > Thank you for your comments and taking time to look at the snips. > > Yes, I think I had commented that the avg+trigger was = triggervolts in > my original post. > > I did find that there was an intermediary process which I had forgot

Re: [Tutor] Reading .csv data vs. reading an array

2019-07-13 Thread Mats Wichmann
On 7/11/19 8:15 AM, Chip Wachob wrote: kinda restating what Oscar said, he came to the same conclusions, I'm just being a lot more wordy: > So, here's where it gets interesting. And, I'm presuming that someone out > there knows exactly what is going on and can help me get past this hurdle. Wel

Re: [Tutor] Reading .csv data vs. reading an array

2019-07-12 Thread Oscar Benjamin
On Thu, 11 Jul 2019 at 18:52, Chip Wachob wrote: > > Hello, Hi Chip, ... > So, here's where it gets interesting. And, I'm presuming that someone out > there knows exactly what is going on and can help me get past this hurdle. I don't think anyone knows exactly what's going on... ... > My gues

[Tutor] Reading .csv data vs. reading an array

2019-07-11 Thread Chip Wachob
Hello, Quick background on what I'm trying to achieve. I have a data set from a digital storage oscilloscope. It includes sampled data points for several electrical events that I'd like to break down and decode. The scope generates a single file with all of the events concatenated. The data se