Python Pandas - 2 || Type A || Sumita Arora || Class 12 || Information Practices || Solution



Q1. Name the function to iterate over a DataFrame horizontally.


Q2. Name the function to iterate over a DataFrame vertically.


Q3. Write 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) A.rdiv(B)
(viii) B.div(A)
(ix) B.rdiv(A)
(x) A.div(B)



Q4. Is the result of sub() and rsub() the same? Why/why not?



Q5. Write appropriate functions to perform the following on a DataFrame?

(i) Calculate the sum
(ii) Count the values
(iii) Calculate the average
(iv) Calculate the most repeated value
(v) Calculate the median
(vi) Calculate the standard deviation
(vii) Calculate the variance
(viii) Calculate the maximum value
(ix) Calculate the standard deviation
(x) Calculate the variance



Q6. What does info() and describe( ) do ?


Q7. Are sum() and add() functions the same ?



Q8. Name some functions that perform descriptive statistics on a DataFrame.


Q9. To consider only the numeric values for calculation, what argument do you pass to statistics functions of Pandas?


Q10. Is there one function that calculates much of descriptive statistics values? Name it.



Q11. What happens if mode() returns multiple values for a column but other columns have a single mode?


Q12. What is quantile and quartile?


Q13. Name the function that lets you calculate different types of quantiles.


Q14. Name the functions that give you maximum and minimum values in a DataFrame.


Q15. Name the functions that give you the index of maximum and minimum values in a DataFrame.


Q16. What is pivoting? Name the two functions that you can use for pivoting.


Q17. What is the basic difference between pivot() and pivot_table( ) ?



Q18. What is missing data?


Q19. Why is missing data filled in DataFrame with some value?


Q20. Name the functions you can use for filling missing data.


Q21. Name the function to create histogram from a DataFrame.


Q22. Name some functions used to handle missing data in dataframes.


Q23. Name some functions used to join or combine dataframes.



Q24. Name two functions that can produce result similar to SQL joins.

Post a Comment

You can help us by Clicking on ads. ^_^
Please do not send spam comment : )

Previous Post Next Post