0% found this document useful (0 votes)
4 views4 pages

Data Science Practical

The document provides code examples for creating various types of charts using Matplotlib, including a line chart for average attendance percentage, a bar chart for average marks of students, a scatter chart for the same data, and a pie chart showing the popularity of programming languages. Each section includes the corresponding code and a brief description of the chart's purpose. The document serves as a practical guide for visualizing data in Python.
Copyright
© All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
4 views4 pages

Data Science Practical

The document provides code examples for creating various types of charts using Matplotlib, including a line chart for average attendance percentage, a bar chart for average marks of students, a scatter chart for the same data, and a pie chart showing the popularity of programming languages. Each section includes the corresponding code and a brief description of the chart's purpose. The document serves as a practical guide for visualizing data in Python.
Copyright
© All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd

DATA SCIENCE PRACTICAL

LINE CHART
CODE:
import [Link] as plt
x = ["X-A","X-B","X-C","X-D","X-E","X-F","X-G","X-H","X-I"]
y=[77.2,79.3,78.5,70.4,70,76.2,73.5,72.9,81.3]
[Link](x, y,color="blue")
[Link](["LINE CHART"])
[Link]("AVERAGE ATTENDANCE PERCENTAGE")
[Link]("CLASS-SECTION")
[Link]("AVERAGE PERCENTAGE")
[Link]()
OUTPUT:
BAR CHART
CODE:
import [Link] as plt
name=["ROHIT","RONIT","SUNIT","AMIT","RAHU
L","AMAN"]
marks = [98.5,87.2,96.8,78.9,91.6,99.1]
[Link](name,marks,color="red")
[Link]("average marks of all students")
[Link]("name of the students")
[Link]("average marks")
[Link]()
OUTPUT:
SCATTER CHART
CODE:
import [Link] as plt
name=["ROHIT","RONIT","SUNIT","AMIT","RAHU
L","AMAN"]
marks = [98.5,87.2,96.8,78.9,91.6,99.1]
[Link](name,marks)
[Link]("average marks of all students")
[Link]("name of the students")
[Link]("average marks")
[Link]()
OUTPUT:
PIE CHART
CODE:
import [Link] as plt
languages = ['Python', 'JavaScript', 'Java', 'C#',
'C++','SQL']
popuratity = [22.2, 17.6, 8.8, 8, 7.7, 6.7]
colors = ["blue", "black", "green", "yellow", "pink",
"magenta"]
[Link](popuratity, labels=languages, colors=colors)
[Link]('PROGRAMMING LANGUAGES')
[Link]()
OUTPUT:

You might also like