Online Test

1). How can you perform a left join between two DataFrames 'df1' and 'df2' on a column 'key'??

2). Which method is used to change the data type of a DataFrame column??

3). How can you calculate the rolling mean of a column 'sales' with a window size of 3??

4). How do you drop rows with missing values in a DataFrame??

5). Which method is used to get the unique values in a DataFrame column??

6). How can you group a DataFrame by a column 'category' and calculate the mean of 'value' for each group??

7). What method would you use to pivot a DataFrame with columns 'index', 'columns', and 'values'??

8). How can you concatenate two DataFrames 'df1' and 'df2' along columns??

9). How can you handle missing values by filling them with a specified value in a DataFrame??

10). Which method would you use to get a summary of the DataFrame's columns and their data types??

11). How can you apply a function to each row of a DataFrame??

12). What method is used to remove a column from a DataFrame??

13). How can you set a column 'date' as the index of a DataFrame??

14). How do you calculate the cumulative sum of a DataFrame column 'amount'??

15). How can you check for duplicates in a DataFrame??

16). What function is used to merge DataFrames based on a common index??

17). How do you save a DataFrame to a CSV file??

18). How can you group data by multiple columns and calculate the sum of another column??

19). How can you pivot a DataFrame with 'index' and 'values' but no 'columns'??

20). What method is used to sort a DataFrame by multiple columns??

21). How do you extract a substring from a DataFrame column 'text'??

22). How can you compute the correlation matrix of a DataFrame??

23). What method is used to reset the index of a DataFrame and move the current index to a column??

24). How can you filter rows where the value of 'score' is between 50 and 100??

Test Results