0
I’m trying to use the time variables (hour, minute and second) that are organized in columns to make a graph. In addition I have information every 1 second and I need it every 1 minute so I cut the data every 60. I used the codes:
tempo = []
for i in range (0,len(sen),60):
monta_tempo = datetime.time(int(sen[i,3]),
int(sen[i,4]),
int(sen[i,5]))
tempo.append(monta_tempo)
And to plot the chart I used:
plt.plot(tempo, media, '.-')
plt.xlabel('tempo')
plt.ylabel('pressão (dB)')
plt.show()
And the guy made the mistake:
TypeError: float() argument must be a string or a number, not 'datetime.time'
I think I’m having a problem leaving the number in one piece, someone can help me to know if that’s what it is and if yes how to do to solve.
That array
sen
? What is it? I’m trying to put together a working example– Miguel