3
A part of a project that I’m developing is to acquire voltage and current data from a solar plate. Per day I have around 40 measures like these that are here.
14/dez 16:54 18.21 0.12 18.35 0.0641
14/dez 16:54 17.82 0.27 17.98 0.2041
14/dez 16:54 17.42 0.44 17.61 0.3041
14/dez 16:54 14.23 0.39 15.30 0.3841
14/dez 16:54 5.92 0.63 7.45 0.6741
14/dez 16:54 4.97 0.54 6.50 0.6441
14/dez 16:54 4.56 0.48 5.91 0.5641
14/dez 16:54 3.51 0.68 4.59 0.7541
14/dez 16:55 2.32 0.60 2.97 0.6841
14/dez 16:55 2.19 0.51 2.76 0.6041
14/dez 16:55 2.13 0.44 2.67 0.5041
14/dez 16:55 0.71 0.67 0.90 0.7641
14/dez 16:55 0.61 0.64 0.77 0.7441
14/dez 16:55 0.00 0.69 0.00 0.821
15/dez 06:04 17.67 0.13 17.61 0.051
15/dez 06:04 15.82 0.25 15.82 0.181
15/dez 06:04 12.41 0.30 13.00 0.231
15/dez 06:04 8.09 0.22 8.72 0.161
15/dez 06:04 2.84 0.31 3.11 0.281
15/dez 06:04 2.38 0.25 2.60 0.191
15/dez 06:04 2.19 0.17 2.40 0.111
15/dez 06:04 1.69 0.36 1.79 0.301
15/dez 06:04 1.07 0.27 1.16 0.241
15/dez 06:04 1.02 0.21 1.10 0.171
15/dez 06:05 1.01 0.10 1.09 0.061
15/dez 06:05 0.33 0.32 0.35 0.311
15/dez 06:05 0.28 0.29 0.30 0.251
15/dez 06:05 0.00 0.33 0.00 0.312
I have to store this data so that in the future it is possible to chart by choosing the day and time for example.
What I want is to store and then retrieve the data more or less like this:
Ex grosseiro para recuperar: plot(data['14/12'].hora['07:00'].medidas)
Does anyone know if you can do this using a database? Or suggests another solution to store?
If it’s in Python it would be even better.
Thank you
Man, thanks! I’ve got a notion. Adjusting a thing or two there I think is right. I will try to leave each block as a single read, and make v1,I1 = list with 14 elements. Hug
– thiagorls
@thiagorls should accept the answer if it was the one that helped you, under the arrows to the left of the answer. Welcome to the pt overflow stack. To make a single block with swap values
...append(...
for...extend(...
– Miguel
Done, thank you!
– thiagorls
You’re welcome @thiagorls, I’m glad I helped
– Miguel
Just one last thing @Miguel, I’m trying to make data be
{'06:04': [(Todos os valores de v1), (todos os valores de i1), (todos v2), (todos i2)]}
instead of{hora: [(v1,i1,v2,i2), (v1,i1,v2,i2)]}
or all together as you gave the tip using extend. Any hint?– thiagorls
@thiagorls, I’ll put this on. 5 mins
– Miguel
@thiagorls, this is http://ideone.com/u13mxK
– Miguel
thanks even man, helped me a lot. I’m really grateful!
– thiagorls
You’re welcome @thiagorls, I think that’s what you wanted
– Miguel
It was @Miguel !!
– thiagorls