Click here to Skip to main content
15,898,820 members
Please Sign up or sign in to vote.
1.00/5 (1 vote)
See more:
Hi..

I have some excel file haing some data.I need to plot a graph for x axis time and y axis price. and need to point peak and non peak points in the graph.


Please help me.

What I have tried:

Tried below.

import pandas as pd
import numpy as np
import matplotlib.pyplot as plt
#import matplotlib.pyplot as plt
df=pd.read_excel('C:/Users/Chethu/Desktop/Rithu.xls')
filtered_df = df[df['Stock'].notnull()]

plt.plot(filtered_df['Time'],filtered_df['Price'])
plt.xlabel('Time(Days)')
plt.ylabel('Value')

#plt.legend()
plt.show()


But i am not getting timing in x axis...Please some body help me to get graph and find peak and non peak value using excel file,
below is ex data,


260.50	ITC	Thu	Dec	14	12:48:46	2017
						
						
260.65	ITC	Thu	Dec	14	12:48:52	2017
						
						
260.60	ITC	Thu	Dec	14	12:48:58	2017
						
						
260.50	ITC	Thu	Dec	14	12:49:03	2017
						
						
260.50	ITC	Thu	Dec	14	12:49:11	2017
						
						
260.55	ITC	Thu	Dec	14	12:49:17	2017
						
						
260.50	ITC	Thu	Dec	14	12:49:22	2017
						
						
260.55	ITC	Thu	Dec	14	12:49:28	2017
						
						
260.50	ITC	Thu	Dec	14	12:49:34	2017
						
						
260.55	ITC	Thu	Dec	14	12:49:39	2017
						
						
260.50	ITC	Thu	Dec	14	12:49:45	2017
						
						
260.50	ITC	Thu	Dec	14	12:49:50	2017
						
						
260.60	ITC	Thu	Dec	14	12:49:57	2017
						
						
260.65	ITC	Thu	Dec	14	12:50:03	2017
Posted
Updated 19-Dec-17 3:18am

You already posted this at Plot not getting properly.[^]
 
Share this answer
 
yaa...i askedexactquertso said...in xaxis time for 5 seconds is not displaying its showing empty
 
Share this answer
 
Comments
Richard Deeming 19-Dec-17 11:20am    
How is this meant to be a "solution" to your (reposted) question?!

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900