Member Avatar for dumicom
dumicom

Hi, How can i find the maximum/minimum of a data every 24 hours.

My Python delimited txt file has over 2 days worth of data

This is a snippet of how my txt file data look like:

TimeStamp,Irradiance,AMB_Temp
21/7/2014 0:00,5.6,25.6
21/7/2014 0:01,4.6,24.6
21/7/2014 0:02,5.6,22.6
21/7/2014 0:03,4.7,25.6
21/7/2014 0:04,5.3,24.6
21/7/2014 0:05,5.2,25.6
.
.
.
22/7/2014 23.59,5.6,24.5

i know how to display it over 2 days but within 24 hours period

this is the code for displaying the max/min value over 2 days:

long_title = 'Irradiance, AMB_Temp vs Time Graph at {} \n Max Value: {:.2f} at {} \n Min Value: {:.2f} at {}'
plt.title(long_title.format(startTime, endTime, max(y),t[np.argmax(y)], min(y),t[np.argmin(y)]))
Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.