21 solutions available
Question 16To calculative cumulative sum of a column of a DataFrame, you may use ............... function.sum()sum(cumulative = True)cumsum()none of...
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 11Functions sum() and cumsum() produce the same result.
Question 17Why is missing data filled in DataFrame with some value ?
Question 6Name and explain some cumulative functions provided by 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 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...