Looking for ADS1001 - Data challenges 1 - S1 2025 test answers and solutions? Browse our comprehensive collection of verified answers for ADS1001 - Data challenges 1 - S1 2025 at learning.monash.edu.
Get instant access to accurate answers and detailed explanations for your course questions. Our community-driven platform helps students succeed!
What is the output of the following code?
import pandas as pd
df1 = pd.DataFrame({ 'A': [1, 2], 'B': ['x', 'y'] })
df2 = pd.DataFrame({ 'A': [3, 4], 'B': ['z', 'w'] })
result = pd.concat([df1, df2], ignore_index=True)
print(result)
Which of the following best describes the difference between pd.merge()
and pd.concat()
in pandas?
on=
, left_on=
, or left_index=True
are provided, pd.merge()
requires at least one column name to be shared by both DataFrames to perform a merge.Which of the following best describes how pd.concat()
behaves by default?
Which best describes aggregation in data analysis?
After grouping and aggregating, what typically happens to the number of rows in the dataset?
What will be the output of the following code?
import pandas as pd
data = {'Category': ['A', 'A', 'B', 'B', 'C'], 'Value': [5, 15, 25, 35, 45], 'Score': [2, 4, 6, 8, 10]}
df = pd.DataFrame(data)
result = df.groupby('Category').agg({'Value': 'sum', 'Score': 'mean'})
print(result)
What will be the output of the following code?
import pandas as pd
data = {'Category': ['A', 'A', 'B', 'B', 'C'], 'Subcategory': ['X', 'Y', 'X', 'Y', 'X'], 'Value': [10, 20, 30, 40, 50]}
df = pd.DataFrame(data)
result = df.pivot(index='Category', columns='Subcategory', values='Value')
print(result)
Which statement best describes the relationship between grouping and aggregation in data analysis?
What is Seaborn?
Get Unlimited Answers To Exam Questions - Install Crowdly Extension Now!