Pandas MCQ Test: Pandas MCQs - Practice Questions
1. Which Pandas method is used to pivot a DataFrame based on column values?
2. In Pandas, what method is used to drop missing values from a DataFrame?
3. What does the `pd.cut()` function in Pandas allow you to do?
4. Which Pandas function is used to calculate summary statistics of a DataFrame?
5. In Pandas, what does the `explode()` function do?
6. In Pandas, what does the `isin()` method do?
7. What is the purpose of the `at_time()` method in Pandas?
8. What is the purpose of the `apply()` function in Pandas?
9. How can you rename a column 'old_name' to 'new_name' in a Pandas DataFrame 'df'?
10. What is the purpose of the `resample()` method in Pandas?
11. How can you perform element-wise addition of two Pandas Series 's1' and 's2'?
12. How can you handle outliers in a Pandas DataFrame?
13. What is the purpose of the `cummin()` function in Pandas?
14. How can you calculate the median of a specific column 'column_name' in a Pandas DataFrame 'df'?
15. How can you efficiently calculate the percentage change in a Pandas DataFrame for multiple columns?
16. What does the `loc` function in Pandas allow you to do?
17. How can you efficiently handle missing values in a Pandas DataFrame considering both forward and backward filling?
18. How can you find the number of unique values in a column 'column_name' in a Pandas DataFrame 'df'?
19. In Pandas, how can you select multiple columns from a DataFrame?
20. How do you rename a column in a Pandas DataFrame?
21. What does the Pandas function 'df.info()' provide?
22. What does the Pandas function 'df.groupby()' allow you to do?
23. In Pandas, how do you efficiently calculate a rolling window average for a specific column?
24. What does the `mode()` function in Pandas calculate?
25. In Pandas, how can you calculate the percentage change in a DataFrame?
26. What does the `diff()` function in Pandas allow you to calculate?
27. How do you efficiently handle time zone conversion in a Pandas DataFrame?
28. In Pandas, what is the purpose of the `nsmallest()` function?
29. What does the Pandas function 'df.isnull()' return?
30. What is the primary data structure in Pandas for handling one-dimensional labeled data?
31. What is the purpose of the `pivot_table()` function in Pandas?
32. What does the `groupby()` function in Pandas allow you to do?
33. What does the `filter()` function in Pandas allow you to do?
34. What is the purpose of the Pandas function 'df.iloc[]'?
35. How can you add a new column 'new_column' with values 1, 2, 3, ... N to a Pandas DataFrame 'df'?
36. How do you efficiently calculate the pairwise correlation matrix for selected columns in a Pandas DataFrame?
37. Which Pandas function is used to perform element-wise mathematical operations on two DataFrames?
38. In Pandas, what does the `interpolate()` function do?
39. How can you select a specific column 'column_name' from a Pandas DataFrame 'df'?
40. Which method is used to fill missing values in a Pandas DataFrame?
41. In Pandas, how can you efficiently handle heavy-tailed distributions by applying a power transformation?
42. What is the purpose of the `between_time()` method in Pandas?
43. How can you handle duplicate rows in a Pandas DataFrame?
44. What is the purpose of the Pandas function 'df.drop_duplicates()'?
45. In Pandas, how can you efficiently handle outliers by transforming them based on a power transformation?
46. In Pandas, how can you sort a DataFrame based on multiple columns?
47. In Pandas, what does the `str.replace()` method do?
48. How can you convert a Pandas DataFrame to a NumPy array?
49. How do you perform multi-index sorting in a Pandas DataFrame?
50. In Pandas, what is the purpose of the `nunique()` function?