You are on page 1of 2

DATA HANDLING USING PANDAS –1

MULTIPLE CHOICE QUESTIONS


1. What is the syntax for creating a series
(A) <series name>=pandas.Series(<list name>,...)
(B) <series name>=pandas.Series(<dictionary name>,...)
(C) <series name>=pandas.Series(<array name>,...)
(D) <series name>=pandas.Series(<scalar value>)
(E) All the above

2. Which of the following is used to create an empty series object


(A) pd.Series(empty) (B) pd.Series(np.NaN)
(C) pd.Series( ) (D) All of these

3. Which of the following is used to get the number of dimensions of a Series object
(A) index (B) size
(C) itemsize (D) ndim

4. Which of the following is used to get the size of datatype of the items in Series object
(A) index (B) size
(C) itemsize (D) ndim

5. Which of the following is used to get the number of elements in a Series object
(A) index (B) size
(C) itemsize (D) ndim

6. Which of the following is used to get the number of bytes of the Series data
(A) hasnans (B) ndim
(C) nbytes (D) dtype

7. Which of the following is used to check whether a Series object has NaN values
(A) nbytes (B) hasnans
(C) dtype (D) ndim

8. What is the use of head( ) function with a Series


(A) Display the last five elements of a Series (B) Displays the first five elements of a Series
(C) Removes the first five elements of a Series (D) Removes the last five elements of a Series

9. Identify the correct statement:


(A) The standard marker for missing data in Pandas is NaN
(B) Series act in a way similar to that of an array
(C) Both of the above
(D) None of the above

10. Minimum number of argument we require to pass in pandas series ?


(A) 1.0 (B) 2.1 (C) 3.2 (D) 4.3

11. Series in Pandas is


(A) 1 dimensional array (B) 2 dimensional array
(C) 3 dimensional array (D) None of the above

12. Which of the following thing can be data in Pandas?


(A) a python dict (B) an ndarray
(C) a scalar value (D) all of the mentioned

13. Point out the correct statement.


(A) If data is a list, if index is passed the values in data corresponding to the labels in the index will be
pulled out
(B) NaN is the standard missing data marker used in pandas
(C) Series acts very similarly to a array
(D) None of the mentioned
2

14. Which command is used for installing the Pandas?


(A) pip install python–pandas (B) pip install pandas
(C) python install python (D) python install pandas

15. Name a data structure where two–dimensional labelled array that is ordered collection of columns is used
to store heterogeneous data types.
(A) Series (B) NumPy Array \
(C) DataFrame (D) Panel

16. In a dataframe, what does axis=0 represents?


(A) Columns (B) Rows
(C) Rows and Columns both (D) None of these

17. Which attribute of a dataframe is used to perform the transpose operation on a dataframe?
(A) T (B) Ndim
(C) Empty (D) Shape

18. Which attribute of a dataframe is used to get number of axis?


(A) size (B) shape (C) values (D) ndim

19. Which method is used to access vertical subset of a dataframe?


(A) loc( ) (B) column( ) (C) iloc( ) (D) All of these

20. Which function is used to find most often appeared values from a set of numbers?
(A) mean( ) (B) median( ) (C) mode( ) (D) None of these

21. Which function is used to rename the existing column or index?


(A) ren( ) (B) rename( ) (C) changename( ) (D) namechange( )

22. Which among the following options can be used to create a DataFrame in Pandas?
(A) A scalar value (B) An ndarray
(C) A python dict (D) All of the above

23. Which of the following can be used to make a Dataframe?


(A) Series (B) DataFrame
(C) Structured ndarray (D) All of the above

24. we can analyze the data in pandas with :


(A) Series (B) DataFrame
(C) Both of the above (D) None of the above

25. All pandas data structures are __________ mutable but not always _________ mutable.
(A) size, value (B) semantic, size
(C) value, size (D) none of the mentioned

26. Point out the correct statement.


(A) Pandas consist of set of labeled array data structures
(B) Pandas consist of an integrated group by engine for aggregating and transforming data sets
(C) Pandas consist of moving window statistics
(D) All of the mentioned

27. Which of the following object you get after reading CSV file?
(A) DataFrame
(B) Character Vector
(C) Panel
(D) All of the mentioned

You might also like