Pandas MCQ Test: Pandas MCQs - Practice Questions
1. How can you filter rows in a Pandas DataFrame 'df' where the column 'column_name' is equal to 10?
2. What does the `groupby()` function in Pandas allow you to do?
3. How can you check the first few rows of a Pandas DataFrame 'df'?
4. What is the purpose of the `ffill()` and `bfill()` functions in Pandas?
5. What is the purpose of the `cummin()` function in Pandas?
6. In Pandas, what does the `str.replace()` method do?
7. How can you efficiently aggregate and count the occurrence of unique combinations in two columns of a Pandas DataFrame?
8. Which Pandas function is used to merge two DataFrames based on a common column?
9. How can you find the number of unique values in a column 'column_name' in a Pandas DataFrame 'df'?
10. How can you efficiently handle missing values in a Pandas DataFrame considering both forward and backward filling?
11. What does the `pd.cut()` function in Pandas allow you to do?
12. What is the purpose of the `between_time()` method in Pandas?
13. What is the primary data structure in Pandas for handling one-dimensional labeled data?
14. What is the purpose of the `pivot_table()` function in Pandas?
15. What does the Pandas function 'df['column_name'].unique()' return?
16. How can you efficiently calculate the percentage change in a Pandas DataFrame for multiple columns?
17. In Pandas, how can you efficiently handle outliers by transforming them based on a power transformation?
18. Which Pandas method is used to pivot a DataFrame based on column values?
19. What is the purpose of the `apply()` function in Pandas?
20. In Pandas, what does the `isin()` method do?
21. How can you efficiently reshape a Pandas DataFrame by converting column values into separate columns with binary indicators?
22. In Pandas, how can you efficiently encode categorical variables using one-hot encoding with a specified prefix for column names?
23. What does the `filter()` function in Pandas allow you to do?
24. Which Pandas function is used to perform element-wise mathematical operations on two DataFrames?
25. How can you select multiple columns 'col1' and 'col2' from a Pandas DataFrame 'df'?
26. In Pandas, what method is used to drop missing values from a DataFrame?
27. How can you calculate the median of a specific column 'column_name' in a Pandas DataFrame 'df'?
28. What is the purpose of the Pandas function 'df.drop_duplicates()'?
29. How do you efficiently handle time zone conversion in a Pandas DataFrame?
30. Which Pandas method is used to calculate the correlation between columns in a DataFrame?