Question
QUESTION 64 Objects that see the data in other objects, rather than having their own copies of the data are called ________ objects. aspect subordinate
QUESTION 64
Objects that "see" the data in other objects, rather than having their own copies of the data are called ________ objects.
aspect | ||
subordinate | ||
scene | ||
view |
1.188 points
QUESTION 65
Which of the following statements is false?
Data science presents unique demands for which more customized data structures are required. | ||
NumPy's array is optimized for heterogeneous numeric data that's accessed via integer indices. | ||
Pandas provides two key collectionsSeries for one-dimensional collections and DataFrames for two-dimensional collections. | ||
Big data applications must support mixed data types, customized indexing, missing data, data that's not structured consistently and data that needs to be manipulated into forms appropriate for the databases and data analysis packages you use. Pandas is the most popular library for dealing with such data. |
1.188 points
QUESTION 66
Which of the following statements is false?
CSV files cannot contain spaces after commas. | ||
The csv module provides functions for working with CSV files. Many other Python libraries also have built-in CSV support. | ||
The csv module's documentation recommends opening CSV files with the additional keyword argument newline='' to ensure that newlines are processed properly. | ||
The csv module's writer function returns an object that writes CSV data to the specified file object. |
1.188 points
QUESTION 67
Which of the following statements is false?
Attempting to divide by 0 results in a ZeroDivisionError. | ||
When an exception is raised in an interactive IPython session, it displays the exception's traceback, then terminates the IPython session. | ||
When a program attempts to divide by zero, the interpreter is said to raise an exception of type ZeroDivisionError. | ||
If an exception occurs in a script, IPython terminates the script and displays the exception's traceback. |
1.188 points
QUESTION 68
Which of the following statements is false?
The following code ensures that a string contains five consecutive digits: re.fullmatch(r'\d{5}', '02215') | ||
The following code returns None because '9876' contains only four consecutive digit characters. re.fullmatch(r'\d{5}', '9876') | ||
The regular-expression metacharacter \ begins each of the predefined regular-expression character classes, which each match a specific set of characters. | ||
A character class is a regular expression escape sequence that matches one or more characters. |
1.188 points
QUESTION 69
Which of the following statements is false?
Dictionary methods items, keys and values each return a view of a dictionary's data. | ||
When you iterate over a view, it "sees" a copy of the dictionary's current contents. | ||
You should not modify a dictionary while iterating through a view. According to the Python Standard Library documentation, either you'll get a RuntimeError or the loop might not process all of the view's values. | ||
Dictionary methods keys and values can be used to iterate through a dictionary's keys or values, respectively. |
1.188 points
QUESTION 70
Which of the following statements a), b) or c) is false?
Pandas displays a Series in two-column format with the indexes left aligned in the left column and the values right aligned in the right column. | ||
After listing the Series elements, pandas shows the data type (dtype) of the underlying array's elements. | ||
It is easier to display a list than a Series in a nice two-column format. | ||
All of the above statements are true. |
1.188 points
QUESTION 71
Which of the following statements is false?
You can quickly transpose a DataFrame's rows and columnsso the rows become the columns, and the columns become the rowsby using the T attribute. | ||||||||||||||||||||||||||
To see the average of all the students' grades on each test, call mean on the T attribute: grades.T.mean() | ||||||||||||||||||||||||||
T returns a transposed copy of the DataFrame. | ||||||||||||||||||||||||||
Assuming the following grades DataFrame:
rather than getting the summary statistics by student, you can get them by test. Simply call describe on grades.T, as in: grades.T.describe() |
1.188 points
QUESTION 72
Which of the following statements is false?
When you call describe on a DataFrame containing both numeric and non-numeric columns, describe calculates the statistics below only for the numeric columnsin the Titanic dataset, for example, just the age column (the dataset 's only numeric column):
| ||||||||||||||||||||
A DataFrame's hist method automatically analyzes each column's data, and produces a corresponding histogram for each. | ||||||||||||||||||||
For non-numeric data, describe displays different descriptive statistics, such as unique (the number of unique values in the result), top (the most frequently occurring value in the result) and freq (the number of occurrences of the top value). | ||||||||||||||||||||
When performing calculations, Pandas ignores missing data (NaN) by default. |
1.188 points
QUESTION 73
The int function raises a ________ if you attempt to convert to an integer a string (like 'hello') that does not represent a number.
NameError | ||
ConversionError | ||
ValueError | ||
None of the above |
1.188 points
QUESTION 74
If you need ________ copies of other types of Python objects, pass them to the ________ module's ________ function.
deep, deepcopy, copy | ||
deep, copy, deepcopy | ||
shallow, copy, copy | ||
shallow, shallowcopy, copy |
1.188 points
QUESTION 75
Which of the following is not a TextBlob capability?
Similarity detection. | ||
Parts-of-speech (POS) tagging. | ||
Sentiment analysis. | ||
Language detection. |
1.188 points
QUESTION 76
Splitting text into meaningful units, such as words and numbers is called ________.
lemmatization | ||
inflectionization | ||
tokenization | ||
parts-of-speech tagging |
1.188 points
QUESTION 77
Which of the following statements a), b) or c) is false?
You can specify custom indices for a Series with the index keyword argument when creating the Series, as in import pandas as pd grades = pd.Series([87, 100, 94], index=['Wally', 'Eva', 'Sam']) | ||
In Part (a), we used string indices, but you can use other immutable types, even including integers not beginning at 0 and nonconsecutive integers. | ||
If you initialize a Series with a dictionary, its values become the Series' indices, and its keys become the Series' element values. | ||
All of the above statements are true. |
1.188 points
QUESTION 78
Which of the following statements a), b) or c) is false?
Most array operations execute significantly faster than corresponding list operations. | ||
With the IPython %timeit magic command, you can time the average duration of operations. | ||
The times displayed by %timeit on one system may vary from those shown on another. | ||
All of the above statements are true. |
1.188 points
QUESTION 79
Which of the following statements a), b) or c) is false?
The following code creates the dictionary roman_numerals, which maps roman numerals to their integer equivalents (the value for 'X' is intentionally wrong): roman_numerals = {'I': 1, 'II': 2, 'III': 3, 'V': 5, 'X': 100} | ||
The following code gets the value associated with the key 'V' in Part (a): roman_numerals['V'] | ||
You can update a key's associated value in an assignment statement. The following code replaces the incorrect value associated with the key 'X' in Part (a): roman_numerals['X'] = 10 | ||
All of the above statements are true. |
1.188 points
QUESTION 80
Consider this text from Shakespeare's Romeo and Juliet: soliloquy = 'To be or not to be, that is the question' Which of the following statements a), b) or c) is false?
String method index searches for a substring within a string and returns the first index at which the substring is found; otherwise, a ValueError occurs. The following code returns 3: soliloquy.index('be') | ||
String method rindex performs the same operation as index, but searches from the end of the string and returns the last index at which the substring is found; otherwise, a Value-Error occurs. The following code returns 3: soliloquy.rindex('be') | ||
String methods find and rfind perform the same tasks as index and rindex but, if the substring is not found, return -1 rather than causing a Value-Error. | ||
All of the above statements are true. |
Step by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started