Python group the data by time (number of seconds) & plot graph -


i have dataset of 'volume' , 'price' of trades 11am 3pm on 30 days, , want average data , group them time. enter image description here

my code is:df = trade.groupby([trade["time"].dt.hour, trade["time"].dt.minute, trade["time"].dt.second]).mean() , gives me:enter image description here

edit: instead of group 'hour''minute' , 'second', how can group them 1 column instead of having 3 columns of 'time'? however, how can plot 'time' against 'volume' in case? need convert time number of seconds?

yes use seconds time, , use moving average. google 'simple moving average' , 'exponential moving average'.

moving averages

good luck, hope helped :d


Comments

Popular posts from this blog

neo4j - finding mutual friends in a cypher statement starting with three or more persons -

php - How to remove letter in front of the word laravel -

minify - Minimizing css files -