101 solutions available
Question 1Assertion. A quantile refers to equally distributed portion of a data set.Reason. A median divides a distribution in 2 quantiles while a...
Question 2Assertion. Data aggregation produces a summary statistics of a dataset.Reason. Data aggregation summarizes data using statistical...
Question 3Assertion. In a dataset, there can be missing values that cannot contribute to any computation.Reason. In a dataset, NULL, NaN or None are...
Question 4Assertion (A). The output of addition of two series will be NaN, if one of the elements or both the elements have no value(s).Reason (R)....
Question 1Name some descriptive statistic functions used with DataFrames.
Question 2To calculate statistical values for each row, the axis argument should be.
Question 3What are quantile and quartiles ?
Question 4What does quantile() do ?
Question 5Name pivoting functions available for DataFrames.
Question 6What does hist() do ?
Question 7What are missing values in a dataset ?
Question 8Write two methods generally used for handling missing values.
Question 9What is the difference between dropna() and fillna() ?
Question 1iterrows() and iteritems() functions help you to iterate over a DataFrame.
Question 2To add two DataFrames, you may use functions add() or radd( ).
Question 3To concatenate two string columns of a DataFrame, + operator is used.
Question 4The mode() function returns the maximum repeating value.
Question 5The mean() function returns the average of given data.
Question 6The median() function returns the halfway point in a given data.
Question 7Using quantile() function you can calculate terciles.
Question 8Using quantile() function you can calculate quartiles.
Question 9Using quantile() function you can calculate octiles.
Question 10Using isnull() method, you can check if there are any missing values in DataFrame.
Question 11The merge() function combines two DataFrames such that two rows with some common value are merged together in the final result.
Question 1To iterate over horizontal subsets of DataFrame, ............... function may be used.iterate()iterrows()itercols()iteritems()
Question 2To iterate over vertical subsets of a DataFrame, ............... function may be used.iterate()iterrows()itercols()iteritems()
Question 3To add two DataFrames' values, ............... function may be used.plusrplusaddradd
Question 4To subtract the values of two DataFrames, ............... function may be used.subdifferenceminusrsub
Question 5To divide the values of two DataFrames, ............... function may be used.dividedivrdivdivision
Question 6Which of the following would give the same output as DF/DF1 where DF and DF1 are DataFrames ?DF.div(DF1)DF1.div(DF)Divide(DF, DF1)Div(DF,...
Question 7To skip NaN values in a calculation, you can specify ............... attribute.NaNNAskipnaall of these
Question 8Which of the following is not a valid function that can be used with DataFrames ?count()sum()length()mad()
Question 9The technique that divides total distribution of data into a given number of equal proportions is called a ..................
Question 10............... divides the total distribution in four equal parts.quartiletercilemedianquantile
Question 11To divide total distribution of given data in two equal parts, ............... function is used.median()quartile()quantile()all of these
Question 12To divide total distribution of given data in four equal parts, ............... function is used.median()quartile()quantile()all of these
Question 13To divide total distribution of given data in eight equal parts, ............... function is used.median()quartile()quantile()all of these
Question 14Which of the following is not a descriptive statistics function ?count()add()sum()max()
Question 15Which function calculates descriptive statistical details for a DataFrame ?info()describe()show()list()
Question 16To calculative cumulative sum of a column of a DataFrame, you may use ............... function.sum()sum(cumulative = True)cumsum()none of...
Question 17The function to get the index of maximum value in a column of DataFrame is ............... .max()index()idxmax()maxidx()
Question 18To get top 5 rows of a DataFrame, you may use ............... function.head()head(5)top()top(5)
Question 19To get bottom 3 rows of a DataFrame, you may use ............... function.tail()tail(3)bottom()bottom(3)
Question 20Function ............... can be used to drop missing values.fillna()isnull()dropna()delna()
Question 21Which of the following methods of combining two DataFrames is a patching method ?concat()merge()join()none of these
Question 1The iteritems() iterates over the rows of a DataFrame.
Question 2The iteritems() iterates over the columns of a DataFrame.
Question 3The result produced by the functions sub() and rsub() is the same.
Question 4The result produced by the functions add() and radd() is the same.
Question 5The result produced by the functions div() and rdiv() is the same.
Question 6The info() and describe() list the same information about a DataFrame.
Question 7Function add() and operator + give the same result.
Question 8Function rsub() and operator - give the same result.
Question 9The minus - operator's result is same as sub() and rsub().
Question 10Python integer datatype can store NaN values.
Question 11Functions sum() and cumsum() produce the same result.
Question 12The fillna() can also fill individual missing values for different columns.
Question 13To drop missing values from a DataFrame, the function used is delna().
Question 1Name the function to iterate over a DataFrame horizontally.
Question 2Name the function to iterate over a DataFrame vertically.
Question 3Write equivalent expressions for the given functions :(i) A.add(B)(ii) B.add(A)(iii) A.sub(B)(iv) B.sub(A)(v) A.rsub(B)(vi) B.mul(A)(vii)...
Question 4Is the result of sub() and rsub() the same? Why/why not ?
Question 5Write appropriate functions to perform the following on a DataFrame ?(i) Calculate the sum(ii) Count the values(iii) Calculate the...
Question 6What does info() and describe() do ?
Question 7Are sum() and add() functions the same ?
Question 8Name some functions that perform descriptive statistics on a DataFrame.
Question 9To consider only the numeric values for calculation, what argument do you pass to statistics functions of Pandas ?
Question 10Is there one function that calculates much of descriptive statistics values ? Name it.
Question 11What happens if mode() returns multiple values for a column but other columns have a single mode ?
Question 12What is quantile and quartile ?
Question 13Name the function that lets you calculate different types of quantiles.
Question 14Name the functions that give you maximum and minimum values in a DataFrame.
Question 15Name the functions that give you the index of maximum and minimum values in a DataFrame.
Question 16What is missing data ?
Question 17Why is missing data filled in DataFrame with some value ?
Question 18Name the functions you can use for filling missing data.
Question 1How do you iterate over a DataFrame?
Question 2What are binary operations ? Name the functions that let you perform binary operations on a DataFrame.
Question 3What is descriptive statistics ? Name Pandas descriptive statistics functions.
Question 4The info() and describe() are said to be inspection functions. What do they do ?
Question 5What is the difference between sum and cumulative sum? How do you perform the two on DataFrame ?
Question 6Name and explain some cumulative functions provided by Pandas.
Question 7The head() and tail() extract rows or columns from a DataFrame. Explain.
Question 8Why does Python change the datatype of a column as soon as it stores an empty value (NaN) even though it has all other values stored as...
Question 9What do quantile and var() functions do ?
Question 10What is a quartile ? How is it different from quantile ?
Question 11How do you create quantiles and quartiles in Python Pandas ?
Question 12Assume that required libraries (Pandas and Numpy) are imported and DataFrame ndf has been created as shown in solved problem 16. Predict...
Question 13Given the two DataFrames as :>>> dfc1 - - 0 1 0 2 a 1 3 b 2 4 c...
Question 14Consider the following code that creates two DataFrames :ore1 = pd.DataFrame(np.array([[20, 35, 25, 20], [11, 28, 32, 29]]),...
Question 15Consider the DataFrame wdf as shown below :...
Question 1Write a program to print a DataFrame one column at a time and print only first three columns.Solutionimport pandas as pd data = {...
Question 2Write a program to print a DataFrame one row at a time and print only first five rows.Solutionimport pandas as pd data = { 'Name':...
Question 3Write a program that performs count, sum, max, and min functions :On rowsOn columnsSolutionimport pandas as pd data = { 'A': [1, 2, 3],...
Question 4Take a DataFrame of your choice. Write a program to calculate count of values only in a selective column.Solutionimport pandas as pd data =...
Question 5Give two identical DataFrames Sales16 and Sales17. But Sales17 has some values missing. Write code so that Sales17 fills its missing values...
Question 6Write code that just produces single True/False as a result for the presence of missing values in whole DataFrame namely df.Solutionimport...
Question 7Four Series objects Temp1, Temp2, Temp3 and Temp4 store the temperatures of week1, week2, week3 and week4 respectively. Create a DataFrame...
Question 8Given a DataFrame that stores the details of past 25 years' monthly sales. Some old data is however missing. Write a script to calculate...
Question 9Given two identical DataFrames Sales16 and Sales17. But Sales17 has some values missing. Write code so that Sales17 fills its missing...
Question 10Write code that just produces single True/False as a result for the presence of missing values in whole DataFrame namely df.Solutionimport...