If Trees=['elm','oak','poplar','plum','pine'] , what is the value of Trees[-3]? - correct
answer 'poplar'
How would you obtain the individual dimensions of the array named testarray? - correct
answer testarray.shape
What does "palindrome"[::-2] return? - correct answer 'eodia'
If df is a dataframe that includes a column 'x', what is NOT a way to add a new column
'y', using a function 'f' that applies a transformation? - correct answer df.y = f(df.x)
In data type specifications, to what does the sign refer? - correct answer the byte order
How do you sort the dataframe DATA according to elements of the column name 'year'
in order of descending years? - correct answer DATA.sort_values('year' ,
ascending=False)
What does .loc('A','B') do when applied to a dataframe with two indices? - correct
answer It extracts records with indices having the values 'A' and 'B' respectively
If we are working with a dataframe df indexed by year, what would df.loc[1914:1918]
return? - correct answer A dataframe including all rows with index between 1914 and
1918 (included), if any
How many different indices may a dataframe have? - correct answer more than three
If df is a dataframe that includes a column 'year', what does 'df.groupby('year') do? -
correct answer Returns a special Pandas object - a grouped dataframe - that lets us
apply aggregations, such as sum( ) or max( ), to each group separately
Which generality best describes the pandas dialect of Python? - correct answer
Statements are formed by concatenating one .method after another
How do you load pandas into the Python shell? - correct answer import pandas
Which code would you use to compute the standard deviation of the values stored in the
one-dimensional array DATA? - correct answer math.sqrt(np.var(DATA))
What does the dataframe groupby operation perform? - correct answer segregation
Which values does np.linspace(0,6,3) return? - correct answer 0, 3, and 6
When concatenating methods in Python, the resulting code is more readable if you
_________. - correct answer place each method on its own line