WorksheetsData handling using pandas and Data visualization
Total questions: 20
Worksheet time: 10mins
Data Frame in pandas is
a) 1 dimensional array
b) 2 dimensional array
c) 3 dimensional array
d) None of the above
Which of the following takes a dict of dicts or a dict of array-like sequences and returns a DataFrame?
a) DataFrame.from_items
b) DataFrame.from_records
c) DataFrame.from_dict
d) All of the mentioned
This function in the library of Pandas allows you to manipulate data and create new variables:
a) read_csv function
b) Pivot_table function
c) apply function
d) merge function
______________ function returns current date and time.
a) SET DATEFIRST
b) SYSDATETIME
c) Cert_ID
d) GETDATE
In a SELECT with a GROUP BY clause, a WHERE clause, and a HAVING clause, the WHERE conditions are applied before the HAVING conditions.
a) True
b) False
c) Either True or False
d) None of the above
We apply the aggregate function to a group of sets of tuples using the _______ clause.
a) group by
b) group
c) group set
d) group attribute
What is the output of the following program?
squares = {1:1, 2:4, 3:9, 4:16, 5:25}
print(squares.pop(4))
print(squares)
16
{1: 1, 2: 4, 3: 9, 5: 25}
16
{1: 1, 2: 4, 3: 9, 4:16, 5: 25}
4
{1: 1, 2: 4, 3: 9, 5: 25}
4
{1: 1, 2: 4, 3: 9, 4:16, 5: 25}
Which is a python package used for 2D graphics?
A. matplotlib.pyplot
B. matplotlib.pip
C. matplotlib.numpy
D. matplotlib.plt
To install matplotlib, the following function will be typed in your command prompt. What does “-U”represents?
Python –m pip install –U pip
A. downloading pip to the latest version
B . upgrading pip to the latest version
C. removing pip
D. upgrading matplotlib to the latest version
The expansion of CRLF is
A. Control Return and Line Feed
B. Carriage Return and Form Feed
C. Control Router and Line Feed
D .Carriage Return and Line Fee
Which of the following creates an object which maps data to a dictionary?
A. listreader()
B. reader()
C. tuplereader()
D. DicReader ()
Identify the right type of chart using the following hints.
Hint 1: This chart is often used to visualize a trend in data over intervals of time.
Hint 2: The line in this type of chart is often drawn chronologically.
A. Line chart
B Bar chart
C. Pie chart
D. Scatter plot
Which of the following is correct Features of DataFrame?
A. Potentially columns are of different types
B. Can Perform Arithmetic operations on rows and columns
C. Labeled axes (rows and columns)
D. All of the above
What is the output of the following program?
y = 8
z = lambda x: x * y
print z (6)
A. 48
B. 14
C. 64
D. None of the above
What will be the output of the following Python code snippet?
d1 = {"john":40, "peter":45}
d2 = {"john":466, "peter":45}
d1 > d2
a) True
b) False
c) Error
d) None
What does the function re.match do?
(A) matches a pattern at the start of the string
(B) matches a pattern at any position in the string
(C) such a function does not exist
(D) none of the mentioned
Point out the correct combination with regards to kind keyword for graph plotting.
a) ‘hist’ for histogram
b) ‘box’ for boxplot
c) ‘area’ for area plots
d) all of the mentioned
In regards to separated value files such as .csv and .tsv, what is the delimiter?
a) Any character such as the comma (,) or tab (\t) that is used to separate the column data.
b) Any character such as the comma (,) or tab (\t) that is used to separate the row data
c) Anywhere the comma (,) character is used in the file
d) Delimiters are not used in separated value files
In data science, which of the python library are more popular ?
a. Numpy
b. Pandas
c. OpenCv
d. Django
Which of the following is incorrect file handling mode in Python
a) r
b) x
c) t+
d) b
