import pandas as pd
my_dict={
'NAME':['Ravi','Raju','Alex',
'Ron','Tor'],
'MATH':[30,40,50,30,50]
}
df = pd.DataFrame(data=my_dict)
df.hist(bins=3)
df.hist(bins=3,xrot=45,yrot=45)
df.hist(bins=3,xrot=180,yrot=180)
df.hist(bins=3,figsize=(6,3));
df.hist( figsize=(5,3),secondary_y=True, mark_right=True)
import pandas as pd
my_dict={
'NAME':['Ravi','Raju','Alex',
'Ron','Tor'],
'MATH':[30,40,50,30,50]
}
df = pd.DataFrame(data=my_dict)
df.plot.hist(bins=3,figsize=(5,3),
grid=True,alpha=0.2,
color=[(.9,.5,.6)])
df.plot.hist(bins=3,figsize=(5,3),
grid=True,alpha=0.2,logx=True,logy=True,loglog=True)
Pandas plot plot.barh()
Author
🎥 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.