Pandas MCQ Test: Pandas MCQs - Practice Questions
1. What does the `melt()` function in Pandas allow you to do?
2. What does the Pandas function 'df.fillna()' do?
3. How can you rename a column 'old_name' to 'new_name' in a Pandas DataFrame 'df'?
4. How do you efficiently apply a function to elements in a specific column of a Pandas DataFrame?
5. In Pandas, what is the purpose of the `nsmallest()` function?
6. What does the `mode()` function in Pandas calculate?
7. How can you check the first few rows of a Pandas DataFrame 'df'?
8. How can you convert a Pandas DataFrame to a NumPy array?
9. What is the purpose of the `between_time()` method in Pandas?
10. How do you efficiently calculate the pairwise correlation matrix for selected columns in a Pandas DataFrame?
11. How can you select a specific column 'column_name' from a Pandas DataFrame 'df'?
12. How can you find the number of unique values in a column 'column_name' in a Pandas DataFrame 'df'?
13. In Pandas, how do you create a new column based on the maximum value from multiple columns?
14. Which Pandas method is used to pivot a DataFrame based on column values?
15. What is the purpose of the `cummin()` function in Pandas?
16. What does the Pandas function 'df['column_name'].unique()' return?
17. How do you rename a column in a Pandas DataFrame?
18. How can you perform element-wise addition of two Pandas Series 's1' and 's2'?
19. In Pandas, how can you sort a DataFrame based on multiple columns?
20. How can you add a new column 'new_column' with values 1, 2, 3, ... N to a Pandas DataFrame 'df'?
21. In Pandas, what does the `explode()` function do?
22. In Pandas, how can you efficiently encode categorical variables using one-hot encoding with a specified prefix for column names?
23. What is the purpose of the Pandas function 'df.iloc[]'?
24. In Pandas, what does the `interpolate()` function do?
25. What does the `loc` function in Pandas allow you to do?
26. In Pandas, how can you select multiple columns from a DataFrame?
27. Which Pandas function is used to calculate summary statistics of a DataFrame?
28. In Pandas, what does the `str.replace()` method do?
29. What does the Pandas function 'df.describe()' provide?
30. How can you handle duplicate rows in a Pandas DataFrame?
31. How can you calculate the median of a specific column 'column_name' in a Pandas DataFrame 'df'?
32. What does the `diff()` function in Pandas allow you to calculate?
33. What is the purpose of the `at_time()` method in Pandas?
34. What is the purpose of the `resample()` method in Pandas?
35. How can you filter rows in a Pandas DataFrame 'df' where the column 'column_name' is equal to 10?
36. How do you efficiently handle time zone conversion in a Pandas DataFrame?
37. In Pandas, how can you efficiently handle outliers by transforming them based on a power transformation?
38. What does the `groupby()` function in Pandas allow you to do?
39. In Pandas, what method is used to drop missing values from a DataFrame?
40. What does the Pandas function 'df.isnull()' return?