- Home
- MCQs by exam
- NTS
- Data Science
NTS MCQs – Data Science · Page 10
266 multiple choice questions typical of the NTS exam, with answers and explanations. Switch on practice mode to test yourself first.
-
A
loc works only on Series
-
B
iloc cannot select rows
-
C
loc uses labels while iloc uses integer positions
Correct answer
-
D
loc uses positions while iloc uses labels
-
A
five
Correct answer
-
B
ten
-
C
one
-
D
all rows
-
A
open_csv()
-
B
load_csv()
-
C
import_csv()
-
D
read_csv()
Correct answer
-
A
a one-dimensional labelled array
Correct answer
-
B
a two-dimensional table
-
C
a collection of DataFrames
-
D
a database connection
-
A
a two-dimensional labelled data structure
Correct answer
-
B
a one-dimensional array of labelled values
-
C
a Python dictionary of lists
-
D
a single column of tabular data
-
A
isna()
-
B
notna()
-
C
fillna()
-
D
dropna()
Correct answer
-
A
'ababab'
Correct answer
-
B
TypeError
-
C
'aaabbb'
-
D
'ab3'
-
A
None
-
B
KeyError
-
C
0
Correct answer
-
D
''
-
A
__init__, __repr__ and __eq__ methods
Correct answer
-
B
A database table for the class
-
C
Getter and setter for each field
-
D
Type checking at runtime for fields
-
A
The string '123'
-
B
A tuple of strings
-
C
The list ['1', '2', '3']
-
D
A lazy map iterator
Correct answer
-
A
No automatic argument
-
B
The class itself (cls)
Correct answer
-
C
The parent module
-
D
The instance (self)
-
A
True
-
B
[3, 1, 2]
-
C
[1, 2, 3]
-
D
None
Correct answer
-
A
[1, 2, 3]
-
B
[2, 3]
Correct answer
-
C
2
-
D
(2, 3)
-
A
None
-
B
TypeError
-
C
False
-
D
True
Correct answer
-
A
nonlocal
Correct answer
-
B
outer
-
C
static
-
D
global
-
A
'-a-b-c-'
-
B
['a-b-c']
-
C
'abc-'
-
D
'a-b-c'
Correct answer
-
A
False
-
B
5
-
C
True
Correct answer
-
D
None
-
A
{2: 'hi', 3: 'cat'}
-
B
{2, 3}
-
C
{'hi': 2, 'cat': 3}
Correct answer
-
D
[2, 3]
-
A
IBM
Correct answer
-
B
Microsoft
-
C
Google
-
D
Intel
-
A
2ⁿ
Correct answer
-
B
n
-
C
2n
-
D
n²
-
A
The total number of elements
-
B
The number of dimensions
Correct answer
-
C
The data type of the array
-
D
The size of each element in bytes
-
A
array([3, 1])
-
B
array([8, 9])
Correct answer
-
C
array([1, 3])
-
D
array([False, True, False, True])
-
A
10
-
B
An IndexError
-
C
40
Correct answer
-
D
30
-
A
8
-
B
2
-
C
1
-
D
4
Correct answer
-
A
Assigns a value inside an expression
Correct answer
-
B
Compares two values for identity
-
C
Swaps the values of two variables
-
D
Declares a constant that cannot change