Interactive Class
Interactive Class
SL. Question
No.
1. Develop a Python code using the Python libraries and write the output for the following.
index = [('California', 2000), ('California', 2010), ('New York', 2000), ('New York', 2010),
('Texas', 2000), ('Texas', 2010)]
populations = [33871648, 37253956,18976457, 19378102,20851820, 25145561]
2. Develop a Python code using the Pandas and write the output for the following.
3. Develop a Python code using the Pandas and write the output for the following.
7. Develop a Python code using Matplotlib and write the output for the following.
i. Create an array 'x' with 100 evenly spaced values from 0 to 10.
ii. Plot sin(x) and cos(x). Save as an image in PNG format.
iii. Create four simple line plots of a sine wave of different colors on each in the
same graph.
iv. Create a simple line plot, adjust using axis limit functions, and reverse the
order of the arguments.
v. Create a simple line plot of four different styles.
vi. Generate a scatter plot with random data points.
vii. Create a simple grid of subplots and use GridSpec.
11. Develop a Python code using Seaborn and write the output for the following.
iris = sns.load_dataset("iris")
iris.head()
12. Develop a Python code using Seaborn and write the output for the following.
tips = sns.load_dataset('tips')
tips.head()
i. Visualize the percentage of tips received by each gender during lunch and
dinner using faceted histogram: FacetGrid and factorplot.
ii. Illustrate the use of jointplot.
13. Develop a Python code using Seaborn and write the output for the following.
planets = sns.load_dataset('planets')
planets.head()
method number orbital_period mass distance year
i. Visualize the count of planets discovered in each year using factorplot and
barplot.
ii. Visualize the count of Method of discovery of each of these planets.