Challenge - 5 Problems
Data Analysis Agent Master
Get all challenges correct to earn this badge!
Test your skills under time pressure!
💻 code output
intermediate2:00remaining
Output of a simple data filtering step in an agent pipeline
Consider an agent pipeline that filters a dataset to include only rows where the value in column 'age' is greater than 30. What is the output DataFrame after this filtering?
Agentic_ai
import pandas as pd data = pd.DataFrame({'name': ['Alice', 'Bob', 'Charlie', 'David'], 'age': [25, 35, 30, 40]}) filtered_data = data[data['age'] > 30] print(filtered_data)
Attempts:
2 left
❓ data output
intermediate2:00remaining
Result of aggregation in a data analysis pipeline
An agent pipeline groups data by 'department' and calculates the average salary. What is the resulting DataFrame?
Agentic_ai
import pandas as pd data = pd.DataFrame({'department': ['HR', 'IT', 'HR', 'IT', 'Finance'], 'salary': [50000, 60000, 55000, 65000, 70000]}) grouped = data.groupby('department')['salary'].mean().reset_index() print(grouped)
Attempts:
2 left
❓ visualization
advanced3:00remaining
Identify the correct plot output from a data analysis agent pipeline
An agent pipeline creates a bar plot showing total sales per product category. Which option correctly describes the plot output?
Agentic_ai
import pandas as pd import matplotlib.pyplot as plt data = pd.DataFrame({'category': ['A', 'B', 'A', 'C', 'B'], 'sales': [100, 200, 150, 300, 250]}) totals = data.groupby('category')['sales'].sum() totals.plot(kind='bar') plt.show()
Attempts:
2 left
🔧 debug
advanced2:00remaining
Identify the error in a data cleaning step of an agent pipeline
An agent pipeline tries to fill missing values in a DataFrame column 'score' with the mean score but raises an error. What is the error?
Agentic_ai
import pandas as pd data = pd.DataFrame({'score': [10, None, 30, None, 50]}) mean_score = data['score'].mean() data['score'] = data['score'].fillna(mean_score()) print(data)
Attempts:
2 left
🚀 application
expert3:00remaining
Determine the final output of a multi-step data analysis agent pipeline
An agent pipeline performs these steps on a DataFrame: 1) filters rows where 'value' > 10, 2) creates a new column 'value_squared' as square of 'value', 3) groups by 'category' and sums 'value_squared'. What is the final output DataFrame?
Agentic_ai
import pandas as pd data = pd.DataFrame({'category': ['X', 'Y', 'X', 'Y', 'Z'], 'value': [5, 15, 20, 8, 25]}) filtered = data[data['value'] > 10] filtered['value_squared'] = filtered['value'] ** 2 grouped = filtered.groupby('category')['value_squared'].sum().reset_index() print(grouped)
Attempts:
2 left
