0% found this document useful (0 votes)
10 views10 pages

IP Class 12th RecordFile Part2

The document contains a series of programming questions focused on using Python with Pandas and data visualization. It includes tasks such as creating Series and DataFrames, performing calculations, and generating various types of charts. The questions are designed to test knowledge of data manipulation and visualization techniques in Python.

Uploaded by

wacoj50444
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)
10 views10 pages

IP Class 12th RecordFile Part2

The document contains a series of programming questions focused on using Python with Pandas and data visualization. It includes tasks such as creating Series and DataFrames, performing calculations, and generating various types of charts. The questions are designed to test knowledge of data manipulation and visualization techniques in Python.

Uploaded by

wacoj50444
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
You are on page 1/ 10

RECORD FILE QUESTIONNAIRE PART-2(PYTHON)

(15 Progs on Pandas + 5 Progs on Data Visualization)

Q1.Write a program to create two Series Object, one from a dictionary and
one from a numpy array.

Q2. Write a program to generate a series of float numbers from 41.0 to 60.0
with an increment of 2.5 each.

Q3. Create the following dataframe, and locate the three largest ‘Age’ values.
Q4. Create a dataframe for examination result and display the row labels,
column labels, data types of each column and the dimension of the
dataframe.

Q5.Consider the above df and answer the following:


(a) Write a command to compute sum of column Age.
(b) Write a command to compute average of last 3 rows of Age column.

Q6. Create a df storing salesmen details (name, zone, sales) of five salesmen.
Q7 Write a Pandas program to create and display a DataFrame from a
specified dictionary data which has the index labels.

Q8. Write a Pandas program to create and display a DataFrame from a


specified dictionary data along with index labels.

Q9. Write a Pandas program to create the following dataframe and get the last 3
rows of a given DataFrame df.

The output should look as follows-


Q10. WAP to c r e a t e a S e r i e s s 1 Sort the values of a Series object s1 in
ascending order of its values and store it into series object s2.

Q11. Write a program to create data series and then change the indexes of the
Series object in any random order.
1 34
0 32
3 78
2 56
dtype: int64

Q12.Write a program to change the column name Rollno to Rno of the


following df→

Rollno Name Marks

SecA 1 Rishi 97

SecB 2 Arun 98

SecC 3 Rohan 98

SecD 4 Soham 99
Q13. Given the df, write a program to print only name, age and position
columns.

Q14.Write a program to iterate over a df containing names and marks, which


then calculates grades as per marks and adds them to the grade column.
Marks>=90 A+, marks70-90 A, marks 60-70 B, marks50-60 C, marks40-50 D,
marks<40 F.
Q15. Use iterrows() to extract data from dataframe row wise:
Q16. The score of four teams in 5 IPL matches is available to you. Write a
program to plot these in a multiple bar chart.

Q17.Navya has started an online business. A list stores the number of orders
in last 6 months. Write a program to plot this data on a horizontal bar chart.
Q18. Given a data frame df1 as shown below-

Write code to create:


(a)A scatter chart from the yr1 to yr2 columns of dataframe df1 .
(b) A line chart from the yr1 to yr2 columns of dataframe df2.
(c) Create a bar chart plotting the three columns of dataframe df1.

Q19.Given the following set of data:


Weight measurements for 16 small orders of French-Fries(in grams)
78 72 69 81 63 67 65 75
79 74 71 83 71 79 80 69

(a) Create a simple histogram from the above data


(b) Create a horizontal histogram from the above data
(c) Create a step type of histogram from the above data
(d) Create a cumulative histogram from the above data.
Q20.Given the following data frame df1.Write a program to plot a bar chart
with the columns Rollno and Marks using the dataframe’s plot().

Rollno Name Marks

SecA 1 Rishi 97

SecB 2 Arun 98

SecC 3 Rohan 98

SecD 4 Soham 99

You might also like