python-noob - which container is appropriate for later exporting into mySql + matplotlib ?
someone
newsboost at gmail.com
Thu Apr 11 09:38:50 EDT 2013
On 2013-04-11 10:49, someone wrote:
> On 2013-04-11 03:39, Cousin Stanley wrote:
> Is there any clever way of avoiding this for loop, for either this
> container or another clever container type?
Ah, I see - I can also just add a numpy array, i.e:
------------------------------
import matplotlib.pyplot as plt
test=numpy.random.rand(8,2)
new_tuple = nt(d,t, float(one), int(two), int(tre), float(fur),
int(fiv), test)
#new_tuple is now:
#csv_data(date='20130315', time='071500', col1=39000.0, col2=10,
#col3=26, col4=48000.0, col5=1, col6=array([[ 0.77714064, 0.06729907],
# [ 0.20418563, 0.97882722],
# [ 0.39130897, 0.06611205],
# [ 0.94938335, 0.50254674],
# [ 0.82047434, 0.71624034],
# [ 0.66618477, 0.92025612],
# [ 0.2789423 , 0.19212809],
# [ 0.7048946 , 0.79112071]]))
x=new_tuple.col6[:,0]
y=new_tuple.col6[:,1]
plt.plot(x,y)
plt.show()
------------------------
I get it - THANKS!
More information about the Python-list
mailing list