Assignment Unit 4
Assignment Unit 4
UNIT-4
1. Why is data transformation important in data science?
2. What are the common types of data transformations? And also explain How can pandas
and scikit-learn be used for data transformation?
3. Why is data cleaning and preparation important?
4. What are the common steps involved in data cleaning and preparation?
5. What are the challenges of data cleaning and preparation?
6. You are provided with monthly sales data for three products (A, B, and C) over a six-
month period. Your task is to analyze and visualize this data using various plot types to
understand sales trends and distributions.
7. A list namely temperature contain average temperature for seven days of last week.
Which chart type will you Plot for the same and why?
8. The score of four cricket team in 4 matches in available to you. Write program to plot
horizontal bar chart with followings:
a. Display legend at bottom right corner
b. Display category axis label as ‘match’
c. Display value axis label as ‘runs’
9. What is the role of legend in chart/graph?
10. How does python supports data visualisation?
11. Write a python program to display a bar chart and pie chart of the number of the students
in the class.
Sample data:
Class: 6,7,8,9,10,11,12
Strength: 42,44,23,12,22,40,89
12. Why the following code is not producing any result? Why it is giving errors?
(Note: All required libraries have been imported and are available.)
a=range(10,15,20),
b=range(90,200,20)
Matplotlib.pyplot.plot(a,b)
13. Write a python program to plot a line chart based on given data to depict the changing
weekly average temperature in Delhi for four weeks.
Week = [1,2,3,4]
Avg Temp = [40,42,50,44]