Question: Python Practical 2 - Plotting a trend graph in Python Construct a line graph showing 2 trends based on: Marks achieved in 2 0 1

Python Practical 2- Plotting a trend graph in Python
Construct a line graph showing 2 trends based on:
Marks achieved in 2010 by subject.
Based on 2 groups score: Semester 1 and Semester 2.
based on the following dataframe.
#import all the libraries
import numpy as np
import pandas as pd
import matplotlib.pyplot as plt
# Create a dataframe
data ={
"Subject": ["Math", "Science", "History", "English", "Geography", "Economics"],
"Marks_2010": [85,78,92,80,88,99],
"Semester": ["Semester 1", "Semester 2", "Semester 1", "Semester 2", "Semester 1", "Semester 2"]
}
df = pd.DataFrame(data)
print(df)

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!