import pandas as pd
import matplotlib.pyplot as plt
df=pd.read_csv(r"C:\Users\Dell\AppData\Roaming\Microsoft\Windows\
Network Shortcuts\practical 8 dv.csv")
df
Major Early Career Pay Mid Career Pay
Percentage
0 Computer Science 70000 120000
25
1 Mechanical Engineering 68000 110000
20
2 Civil Engineering 62000 95000
15
3 Business Administration 60000 100000
18
4 Psychology 50000 85000
12
5 Education 48000 78000
10
plt.figure(figsize=(10,8))
<Figure size 1000x800 with 0 Axes>
<Figure size 1000x800 with 0 Axes>
plt.subplot(2,2,1)
plt.plot(df['Major'],df['Early Career Pay'],marker='o')
plt.title('Line Plot')
Text(0.5, 1.0, 'Line Plot')
plt.subplot(2,2,2)
plt.bar(df['Major'],df['Mid Career Pay'],color='purple')
plt.title('Bar CHART')
Text(0.5, 1.0, 'Bar CHART')
plt.subplot(2,2,4)
plt.scatter(df['Early Career Pay'],df['Mid Career
Pay'],color='yellow')
plt.title('Scatter Chart')
plt.xlabel('Early Career Pay')
plt.ylabel('Mid Career Pay')
Text(0, 0.5, 'Mid Career Pay')
plt.subplot(2,2,4)
plt.pie(df['Mid Career Pay'],labels=df['Major'],autopct='%1.1f%%')
plt.title('pie chart')
Text(0.5, 1.0, 'pie chart')
plt.subplot(3,2,6)
plt.hist(df['Early Career
Pay'],bins=5,color='purple',edgecolor='black')
plt.title('histogram chart')
Text(0.5, 1.0, 'histogram chart')
plt.subplot(3,2,5)
plt.barh(df['Mid Career Pay'],df['Early Career Pay'],color='skyblue')
plt.title('horizontal bar')
Text(0.5, 1.0, 'horizontal bar')