import pandas as pd
my_dict={
'NAME':['Ravi','Raju','Alex','Ron','Geek','Kim'],
'MARK':[20,30,40,30,40,50]
}
my_df = pd.DataFrame(data=my_dict)
print(my_df)
Output is here
NAME MARK
0 Ravi 20
1 Raju 30
2 Alex 40
3 Ron 30
4 Geek 40
5 Kim 50
import pandas as pd
my_dict={
'NAME':['Ravi','Raju','Alex',
'Ron','Geek','Kim'],
'MARK':[20,30,40,30,40,50]
}
df = pd.DataFrame(data=my_dict)
df.plot.line(title="Std Mark");
import pandas as pd
my_dict={
'NAME':['Ravi','Raju','Alex',
'Ron','Geek','Kim'],
'MARK':[20,30,40,30,40,50]
}
df = pd.DataFrame(data=my_dict)
my_style=['-.']
df.plot.line( title="Student Mark",figsize=(6,3),x='NAME',y='MARK',
use_index=True,grid=True,legend=True,style=my_style)
import pandas as pd
my_dict={
'NAME':['Ravi','Raju','Alex',
'Ron','Geek','Kim'],
'MARK':[20,30,40,30,40,50],
'ENGLISH':[80,70,60,70,90,80]
}
df = pd.DataFrame(data=my_dict)
df.plot.line( title="Student Mark",x='NAME',y='ENGLISH',use_index=True,legend=True)
my_style=[':']
df.plot.line( title="style =[ ':'] ",x='NAME',style=my_style)
df.plot.line( title="loglog=True",figsize=(5,3),loglog=True)
df.plot.line( title="secondary_y=True",x='NAME',figsize=(5,3),secondary_y=True)
df.plot.line( title="rot=180",x='NAME',figsize=(5,3),rot=180)
Pandas plot
Pie plot
Bar plot
Box plot
Density plot
Area plot
Scatter Plot
Hexbin plotAuthor
🎥 Join me live on YouTubePassionate about coding and teaching, I publish practical tutorials on PHP, Python, JavaScript, SQL, and web development. My goal is to make learning simple, engaging, and project‑oriented with real examples and source code.