S
someone
Hi,
Here's my data:
-----------------------
20130315T071500 39000. 10 26 48000. 1 40
20130315T071501 39000. 10 26 48000. 2 42
20130315T071501 39000. 10 26 47520. 15 69
20130315T071501 39000. 10 26 47160. 1 70
20130315T071501 39000. 10 26 47000. 1 72
20130315T071501 39000. 10 26 47000. 2 81
20130315T071501 39000. 10 26 47000. 6 85
20130315T071501 39000. 10 26 46520. 10 95
20130315T071501 43000. 10 36 46520. 10 95
20130315T071501 43200. 4 43 46520. 10 104
20130315T071501 44040. 1 45 46520. 10 108
20130315T071501 44080. 3 48 46520. 10 109
20130315T071501 44080. 3 48 46520. 11 113
20130315T071501 44080. 3 48 46400. 2 131
20130315T071501 45080. 1 51 46400. 2 145
20130315T071501 45080. 1 51 46200. 1 147
20130315T071501 45080. 1 60 46120. 1 182
20130315T071501 45520. 1 65 46120. 1 225
20130315T071501 45520. 1 73 46120. 2 247
20130315T080000 45760. 1 133 46120. 2 378
20130315T080241 45760. 2 199 46120. 2 453
20130315T080945 45760. 3 217 46120. 2 456
20130315T081103 45760. 3 217 46080. 1 457
20130315T081105 45760. 3 218 46080. 2 458
20130315T081106 45760. 4 222 46080. 2 458
20130315T081107 45800. 1 229 46080. 2 458
20130315T082754 45800. 8 266 46080. 2 514
......
.....
....
etc.
-----------------------
The first column is date + time. I know how to use simple tuples, list's
and dict's. But I don't think it's a good idea to make each line an
element in a list/dict ?
I want to put this table into an appropriate container such that
afterwards I want to:
1) Put the data into a mySql-table
2) Be able to easily plot column 1 vs. either of the other columns using
matplotlib etc...
I consider myself a python-newbie so I'm not that good with
containers... I found something here:
http://docs.python.org/dev/library/collections.html but I'm not really
sure what is a good pythonic way of storing this data?
I also think that maybe I ought to convert the first data+time column
into a single number, because right now it's a string (because there's a
"T" in the middle of column 1)... Letting the date+time-column (=column
1) become entirely numbers, makes it easier to plot in matplotlib
afterwards...
I'm not sure how to store this in an efficient manner... What (=how?)
would you do it?
Thanks...
Here's my data:
-----------------------
20130315T071500 39000. 10 26 48000. 1 40
20130315T071501 39000. 10 26 48000. 2 42
20130315T071501 39000. 10 26 47520. 15 69
20130315T071501 39000. 10 26 47160. 1 70
20130315T071501 39000. 10 26 47000. 1 72
20130315T071501 39000. 10 26 47000. 2 81
20130315T071501 39000. 10 26 47000. 6 85
20130315T071501 39000. 10 26 46520. 10 95
20130315T071501 43000. 10 36 46520. 10 95
20130315T071501 43200. 4 43 46520. 10 104
20130315T071501 44040. 1 45 46520. 10 108
20130315T071501 44080. 3 48 46520. 10 109
20130315T071501 44080. 3 48 46520. 11 113
20130315T071501 44080. 3 48 46400. 2 131
20130315T071501 45080. 1 51 46400. 2 145
20130315T071501 45080. 1 51 46200. 1 147
20130315T071501 45080. 1 60 46120. 1 182
20130315T071501 45520. 1 65 46120. 1 225
20130315T071501 45520. 1 73 46120. 2 247
20130315T080000 45760. 1 133 46120. 2 378
20130315T080241 45760. 2 199 46120. 2 453
20130315T080945 45760. 3 217 46120. 2 456
20130315T081103 45760. 3 217 46080. 1 457
20130315T081105 45760. 3 218 46080. 2 458
20130315T081106 45760. 4 222 46080. 2 458
20130315T081107 45800. 1 229 46080. 2 458
20130315T082754 45800. 8 266 46080. 2 514
......
.....
....
etc.
-----------------------
The first column is date + time. I know how to use simple tuples, list's
and dict's. But I don't think it's a good idea to make each line an
element in a list/dict ?
I want to put this table into an appropriate container such that
afterwards I want to:
1) Put the data into a mySql-table
2) Be able to easily plot column 1 vs. either of the other columns using
matplotlib etc...
I consider myself a python-newbie so I'm not that good with
containers... I found something here:
http://docs.python.org/dev/library/collections.html but I'm not really
sure what is a good pythonic way of storing this data?
I also think that maybe I ought to convert the first data+time column
into a single number, because right now it's a string (because there's a
"T" in the middle of column 1)... Letting the date+time-column (=column
1) become entirely numbers, makes it easier to plot in matplotlib
afterwards...
I'm not sure how to store this in an efficient manner... What (=how?)
would you do it?
Thanks...