In Pandas, which object is a two-dimensional, size-mutable, and potentially heterogeneous tabular data?ArraySeriesDataFrameMatrixWhich function is used to get the statistical summary of a Pandas DataFrame?info()summary()describe()statistics()Which of the python function that reverses a given stringdef reverse_string(s): return s[::-1]def reverse_string(s): return s[:-1]def reverse_string(s): return s[-1::]def reverse_string(s): return s[::1]What is the syntax for slicing?[start : stop : step][start : step : stop][stop : start : step][step : start : stop]What is the below code an example of?mylist = [1, 2, 3, 4, 5]squared = [x**2 for x in mylist]list comprehensionlist rollinglist updatinglist expansionWhat is a lambda used for in Python?It is a math module functionIt is an anonymous functionIt is an anonymous function that can only accept a single argumentIt is an anonymous function that can be called only once the program beginsWhat is Pickling in Python?It is a serialization processIt is a style of naming files and variables in PythonIt is a string compression algorithmWhat does ALTER TABLE do?Moves a table from one database to another.Transposes the rows and columns in a tableModifies a tableWhen there are multiple conditions and we need to choose something on the basis of these conditions, what function can we use?CASEBYIFTHENWHENJUMPWhat does the following SQL code do?SELECT name, MAX(salary) FROM Employees WHERE salary < (SELECT MAX(salary) FROM employees);Returns the row with the second highest salaryReturns all the rows that are less than the max salaryReturns the row with the highest salaryHow do you execute a stored procedure in SQL?PROCEDURE procedure_nameRUN_PROC procedure_nameEXEC procedure_nameEXECUTE procedure_nameWhich JOIN does the following: returns all the values from the right table, plus matched values from the left table or NULL in case of no matching join predicate.FULL OUTER JOININNER JOINRIGHT JOINLEFT JOINA team leader has two projects to complete within a one-week timeframe. Project 1 requires 5 points of effort, and Project 2 requires 4 points. The team consists of three members with the following weekly velocities: Alice can complete 5 points, Bob can complete 4 points, and Charlie can complete 3 points. How should the team leader assign the projects to ensure they are both completed on time?Alice on Project 1, Bob on Project 2, Charlie not assignedCharlie on Project 1, Alice on Project 2, Bob not assignedAlice on Project 2, Bob on Project 1, Charlie not assignedBob on Project 1, Charlie on Project 2, Alice not assignedAs a travel agent, you are tasked with finding a vacation package that fits a client`s budget of $1500 for a 2-week vacation, with at least one meal included daily. Which package would you recommend?An all-inclusive travel package to Barbados for $2000 total, with three meals a day includedAn all-inclusive travel package to Cuba for $1400 total, with three meals a day includedA travel package to Tuscany for $1600 total, meals not includedA travel package to New York City for $2100 total, with breakfast includedThe first step of Heap sort is to:Build a max/min heapCompress the heapRemove the largest element from the heapConvert the heap to a treeIn Pandas, how do you concatenate two DataFrames along columns?df1.append(df2, along=`columns`)pd.concat([df1, df2], axis=1)df1.concat(df2, axis=0)pd.merge(df1, df2, along=`columns`)How do you replace all NaN values with zeros in a Pandas DataFrame?df.fillna(0)df.null(0)df.NaNtoZero()df.replace(`NaN`, 0)How can you set the index of a Pandas DataFrame to be one of its columns?df.index_as(`column_name`)df.set_index(`column_name`)df.setIndex(`column_name`)df.index(`column_name`)Which metric is used to evaluate the performance of a regression model in scikit-learn?Mean Squared Error (MSE)AccuracyArea Under Curve (AUC)F1-ScoreIn Pandas, which method is used to compute a histogram of a set of data?plot(kind=`hist`)bar()value_counts()hist()In Pandas, how can you select data from a DataFrame where the column value is in a list of values?df.select(`column` from value_list)df.get(df[`column`] in value_list)df.query(`column` in value_list)df[df[`column`].isin(value_list)]Which command is used to save a figure as a PNG file in Matplotlib?plt.write(`filename.png`)plt.savefig(`filename.png`)plt.store(`filename.png`)plt.save(`filename.png`)If `All X are Y` and `Some Y are Z`, which of the following must be true?No X are ZAll X are ZSome X are ZAll Z are XWhich of the following statements is logically equivalent to `If not P, then not Q`?If P, then QIf Q, then PIf not Q, then not PIf Q, then not PA clock shows 3:15. What is the angle between the hour and minute hands?15 degrees22.5 degrees7.5 degrees0 degrees
Question
In Pandas, which object is a two-dimensional, size-mutable, and potentially heterogeneous tabular data?ArraySeriesDataFrameMatrixWhich function is used to get the statistical summary of a Pandas DataFrame?info()summary()describe()statistics()Which of the python function that reverses a given stringdef reverse_string(s): return s[::-1]def reverse_string(s): return s[:-1]def reverse_string(s): return s[-1::]def reverse_string(s): return s[::1]What is the syntax for slicing?[start : stop : step][start : step : stop][stop : start : step][step : start : stop]What is the below code an example of?mylist = [1, 2, 3, 4, 5]squared = [x**2 for x in mylist]list comprehensionlist rollinglist updatinglist expansionWhat is a lambda used for in Python?It is a math module functionIt is an anonymous functionIt is an anonymous function that can only accept a single argumentIt is an anonymous function that can be called only once the program beginsWhat is Pickling in Python?It is a serialization processIt is a style of naming files and variables in PythonIt is a string compression algorithmWhat does ALTER TABLE do?Moves a table from one database to another.Transposes the rows and columns in a tableModifies a tableWhen there are multiple conditions and we need to choose something on the basis of these conditions, what function can we use?CASEBYIFTHENWHENJUMPWhat does the following SQL code do?SELECT name, MAX(salary) FROM Employees WHERE salary < (SELECT MAX(salary) FROM employees);Returns the row with the second highest salaryReturns all the rows that are less than the max salaryReturns the row with the highest salaryHow do you execute a stored procedure in SQL?PROCEDURE procedure_nameRUN_PROC procedure_nameEXEC procedure_nameEXECUTE procedure_nameWhich JOIN does the following: returns all the values from the right table, plus matched values from the left table or NULL in case of no matching join predicate.FULL OUTER JOININNER JOINRIGHT JOINLEFT JOINA team leader has two projects to complete within a one-week timeframe. Project 1 requires 5 points of effort, and Project 2 requires 4 points. The team consists of three members with the following weekly velocities: Alice can complete 5 points, Bob can complete 4 points, and Charlie can complete 3 points. How should the team leader assign the projects to ensure they are both completed on time?Alice on Project 1, Bob on Project 2, Charlie not assignedCharlie on Project 1, Alice on Project 2, Bob not assignedAlice on Project 2, Bob on Project 1, Charlie not assignedBob on Project 1, Charlie on Project 2, Alice not assignedAs a travel agent, you are tasked with finding a vacation package that fits a clients budget of $1500 for a 2-week vacation, with at least one meal included daily. Which package would you recommend?An all-inclusive travel package to Barbados for $2000 total, with three meals a day includedAn all-inclusive travel package to Cuba for $1400 total, with three meals a day includedA travel package to Tuscany for $1600 total, meals not includedA travel package to New York City for $2100 total, with breakfast includedThe first step of Heap sort is to:Build a max/min heapCompress the heapRemove the largest element from the heapConvert the heap to a treeIn Pandas, how do you concatenate two DataFrames along columns?df1.append(df2, along=columns)pd.concat([df1, df2], axis=1)df1.concat(df2, axis=0)pd.merge(df1, df2, along=columns)How do you replace all NaN values with zeros in a Pandas DataFrame?df.fillna(0)df.null(0)df.NaNtoZero()df.replace(NaN, 0)How can you set the index of a Pandas DataFrame to be one of its columns?df.index_as(column_name)df.set_index(column_name)df.setIndex(column_name)df.index(column_name)Which metric is used to evaluate the performance of a regression model in scikit-learn?Mean Squared Error (MSE)AccuracyArea Under Curve (AUC)F1-ScoreIn Pandas, which method is used to compute a histogram of a set of data?plot(kind=hist)bar()value_counts()hist()In Pandas, how can you select data from a DataFrame where the column value is in a list of values?df.select(column from value_list)df.get(df[column] in value_list)df.query(column in value_list)df[df[column].isin(value_list)]Which command is used to save a figure as a PNG file in Matplotlib?plt.write(filename.png)plt.savefig(filename.png)plt.store(filename.png)plt.save(filename.png)If All X are YandSome Y are Z, which of the following must be true?No X are ZAll X are ZSome X are ZAll Z are XWhich of the following statements is logically equivalent to If not P, then not Q`?If P, then QIf Q, then PIf not Q, then not PIf Q, then not PA clock shows 3:15. What is the angle between the hour and minute hands?15 degrees22.5 degrees7.5 degrees0 degrees
Solution
-
In Pandas, a DataFrame is a two-dimensional, size-mutable, and potentially heterogeneous tabular data.
-
The function used to get the statistical summary of a Pandas DataFrame is describe().
-
The Python function that reverses a given string is:
def reverse_string(s):
return s[::-1]
-
The syntax for slicing is [start : stop : step].
-
The below code is an example of list comprehension.
mylist = [1, 2, 3, 4, 5]
squared = [x**2 for x in mylist]
-
A lambda is used for creating an anonymous function in Python.
-
Pickling in Python is a serialization process.
-
ALTER TABLE is used to modify a table.
-
When there are multiple conditions and we need to choose something on the basis of these conditions, we can use CASE function.
-
The following SQL code returns the row with the second highest salary.
SELECT name, MAX(salary) FROM Employees WHERE salary < (SELECT MAX(salary) FROM employees);
-
You execute a stored procedure in SQL using EXEC procedure_name.
-
The JOIN that returns all the values from the right table, plus matched values from the left table or NULL in case of no matching join predicate is RIGHT JOIN.
-
The team leader should assign Alice on Project 1, Bob on Project 2, Charlie not assigned to ensure both projects are completed on time.
-
As a travel agent, you should recommend an all-inclusive travel package to Cuba for $1400 total, with three meals a day included.
-
The first step of Heap sort is to build a max/min heap.
-
In Pandas, you concatenate two DataFrames along columns using pd.concat([df1, df2], axis=1).
-
You replace all NaN values with zeros in a Pandas DataFrame using df.fillna(0).
-
You can set the index of a Pandas DataFrame to be one of its columns using df.set_index(
column_name). -
The metric used to evaluate the performance of a regression model in scikit-learn is Mean Squared Error (MSE).
-
In Pandas, the method used to compute a histogram of a set of data is plot(kind=
hist). -
In Pandas, you can select data from a DataFrame where the column value is in a list of values using df[df[
column].isin(value_list)]. -
The command used to save a figure as a PNG file in Matplotlib is plt.savefig(
filename.png). -
If
All X are YandSome Y are Z, thenSome X are Zmust be true. -
The statement logically equivalent to
If not P, then not QisIf Q, then P. -
A clock showing 3:15 has an angle of 7.5 degrees between the hour and minute hands.
Similar Questions
If df is a Dataframe with 3 columns Col1, Col2 and Col3 , what type of data is df[‘Col1’]?One dimensional numpy arrayOne dimensional ListSeriesDataframe with one column
What type of data is stored in the 'geometry' column of a GeoDataFrame?Numerical dataCategorical dataTime-series dataGeographical data (points, lines, polygons)
Which of the following data structures is not supported by Pandas?SeriesDataFrameArrayPanel
40.Which among the given is true for the statement:- A DataFrame in Pandas is a: A. 2-dimensional array B. Multidimensional array C. 1-dimensional array D. 3-dimensional array
In Pandas, what is a DataFrame?
Upgrade your grade with Knowee
Get personalized homework help. Review tough concepts in more detail, or go deeper into your topic by exploring other relevant questions.