/**/ Python & MySQL: Question Bank-1

Wednesday, April 15, 2020

Question Bank-1

Dear Students,
I am providing a Question Bank for Class XII. This Question Bank is specially made for IP Students. In this Question Bank I am giving you 15 Questions. Time to time I will provide you Question Bank, that is related to your subject.

Note: If you have any question related to IP Subject you can write in comment box. 


INFORMATICS PRACTICES(065)
XII
Question Bank(Set -1)
Q.1
What is the difference between reindex() and rename()?
Ans
The reindex() function is used to change the order or existing labels in dataframe whereas rename() function renames the existing indexes in dataframe.
Q.2
What is DataFrame?
Ans
It is a 2-dimensional data structure with columns of different types. It is just similar to a spreadsheet or SQL table, or a dict of Series objects. It is generally the most commonly used pandas object.
Q.3
Explain pivot() and pivot_table().
Ans
Pivot –Pivot reshapes data and uses unique values from index/ columns to form axes of the resulting dataframe. Index is column name to use to make new frame’s index.Columns is column name to use to make new frame’s columns.Values  is column name to use for populating new frame’s values.

Pivot_table - Pivot table is used to summarize and aggregate data inside dataframe.
Q.4
Write the similarity and one difference between pivot() and pivot_table()?
Ans
Similarity: Both perform data pivoting a data set
Difference: pivot_table() can work on duplicate entries, whereas pivot() can not deal with duplicate values for one index/column.
Q.5
What are the difference between matplotlib and pyplot?
Ans
The pyplot is one of the interface of matplotlib of python library.The pyplot essentially reproduces plotting functions and behaviours of MATLIB.
Q.6
What is the use of pipe() in python pandas?
Ans
The Pipe() creates a pipe and returns a pair of file descriptors(r,w)usable for reading and writing ,respectively
Q.7
Explain the use of groups in python pandas.
Ans
Pandas dataframe groupby() function is used to split the data into groups based on some criteria. pandas objects can be split on any of their axes. The abstract definition of grouping is to provide a mapping of labels to group  names.
Q.8
Write down name of fuctions to create line chart and bar chart.
Ans
Plot(),Scatter(),bar(),barh()etc.
Q.9
Mention at least four functions for aggregation in Python.
Ans
Max(),min(),count()sum(),mean(),median(),std(),var
Q.10
Differentiate with example between hstack() and vstack().
Ans
hstack() joins arrays horizontally whereas vstack() joins  them vertically.   

Ex.x1=[1,2,3,4]  x2=[10,20,3,40]  x3=[[1,2,3,4],[10,20,30,40]] x4=[100,200] Numpy.hstack(x3,x4) 
Numpy.vstack(x1,x2)

Q.11
What is the basic difference between apply() and applymap() functions in Python?
Ans
Apply() is a series function, that returned single value per column whereas applymap() is an Element function,hence return single value per element.
Q.12
What are the various ways to perform arithmetic operations on numpy arrays?
Ans
+,-,*,%,//,/ and add(),multiply(),subtract(),divide(),mod(),remainder()

No comments:

Post a Comment

Please do not any spam in the comment box.

CLASS XI HALF YEARLY QP WTH MS 2024

  Half Yearly Examination: 2024-25 Informatics Practices (065) Class- XI       Time Allowed: 3hrs                                     ...