You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
tests/test_m1.py:59: in test_yellow_expensive_count
assert int(result) == expected, f"預期 {expected},你的結果: {result}"
^^^^^^^^^^^
E TypeError: int() argument must be a string, a bytes-like object or a real number, not 'builtin_function_or_method'
M2 Pandas 清理(75/100 — 75%)
題目
分數
狀態
test_green_read_csv
10/10
✅
test_green_shape
10/10
✅
test_green_dtypes
10/10
✅
test_yellow_clean_columns
15/15
✅
test_yellow_clean_amount
15/15
✅
test_yellow_drop_duplicates
15/15
✅
test_red_clean_orders_returns_df
0/4
❌
test_red_clean_orders_columns
0/4
❌
test_red_clean_orders_amount_is_numeric
0/4
❌
test_red_clean_orders_date_is_datetime
0/5
❌
test_red_clean_orders_no_nulls
0/4
❌
test_red_clean_orders_no_duplicates
0/4
❌
❌ 錯誤提示(點擊展開)
test_red_clean_orders_returns_df
tests/test_m2.py:59: in test_red_clean_orders_returns_df
assert result is not None, "函式回傳了 None,請確認有 return"
E AssertionError: 函式回傳了 None,請確認有 return
E assert None is not None
test_red_clean_orders_columns
tests/test_m2.py:64: in test_red_clean_orders_columns
assert result is not None
E assert None is not None
test_red_clean_orders_amount_is_numeric
tests/test_m2.py:70: in test_red_clean_orders_amount_is_numeric
assert result is not None
E assert None is not None
test_red_clean_orders_date_is_datetime
tests/test_m2.py:76: in test_red_clean_orders_date_is_datetime
assert result is not None
E assert None is not None
test_red_clean_orders_no_nulls
tests/test_m2.py:82: in test_red_clean_orders_no_nulls
assert result is not None
E assert None is not None
test_red_clean_orders_no_duplicates
tests/test_m2.py:88: in test_red_clean_orders_no_duplicates
assert result is not None
E assert None is not None
M3 Pandas 進階(90/100 — 90%)
題目
分數
狀態
test_green_load_and_merge
0/10
❌
test_green_row_count
10/10
✅
test_green_column_list
10/10
✅
test_yellow_top_category
15/15
✅
test_yellow_gold_vip_stats
15/15
✅
test_yellow_region_avg_amount
15/15
✅
test_red_rfm_top5_shape
9/9
✅
test_red_rfm_top5_columns
8/8
✅
test_red_rfm_top5_sorted_by_m
8/8
✅
❌ 錯誤提示(點擊展開)
test_green_load_and_merge
tests/test_m3.py:21: in test_green_load_and_merge
result = green_load_and_merge()
^^^^^^^^^^^^^^^^^^^^^^
homework/m3_pandas_advanced.py:26: in green_load_and_merge
orders = pd.read_csv('../datasets/ecommerce/orders_clean.csv')
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^...
M4 時間序列(30/100 — 30%)
題目
分數
狀態
test_green_avg_by_month
0/10
❌
test_green_top3_dates
0/10
❌
test_green_date_range
0/10
❌
test_yellow_monthly_revenue
0/15
❌
test_yellow_rolling_avg
15/15
✅
test_yellow_category_median
15/15
✅
test_red_monthly_report_columns
0/9
❌
test_red_monthly_report_values
0/8
❌
test_red_monthly_report_growth
0/8
❌
❌ 錯誤提示(點擊展開)
test_green_avg_by_month
tests/test_m4.py:17: in test_green_avg_by_month
result = green_avg_by_month()
^^^^^^^^^^^^^^^^^^^^
homework/m4_timeseries.py:29: in green_avg_by_month
return df.groupby(df['order_date'].dt.month)['amount'].mean()
^^
E NameError: name 'df' is not defined
test_green_top3_dates
tests/test_m4.py:29: in test_green_top3_dates
result = green_top3_dates()
^^^^^^^^^^^^^^^^^^
homework/m4_timeseries.py:38: in green_top3_dates
return df['order_date'].dt.date.value_counts().head(3)
^^
E NameError: name 'df' is not defined
test_green_date_range
tests/test_m4.py:36: in test_green_date_range
result = green_date_range()
^^^^^^^^^^^^^^^^^^
homework/m4_timeseries.py:46: in green_date_range
return (df['order_date'].min(), df['order_date'].max())
^^
E NameError: name 'df' is not defined
test_yellow_monthly_revenue
tests/test_m4.py:45: in test_yellow_monthly_revenue
result = yellow_monthly_revenue()
^^^^^^^^^^^^^^^^^^^^^^^^
homework/m4_timeseries.py:61: in yellow_monthly_revenue
return df.set_index('order_date').resample('ME')['amount'].sum()
^^
E NameError: name 'df' is not d...
test_red_monthly_report_columns
tests/test_m4.py:78: in test_red_monthly_report_columns
result = red_monthly_report()
^^^^^^^^^^^^^^^^^^^^
homework/m4_timeseries.py:99: in red_monthly_report
report = df.set_index('order_date').resample('ME').agg({
^^
E NameError: name 'df' is not defined
test_red_monthly_report_values
tests/test_m4.py:88: in test_red_monthly_report_values
result = red_monthly_report()
^^^^^^^^^^^^^^^^^^^^
homework/m4_timeseries.py:99: in red_monthly_report
report = df.set_index('order_date').resample('ME').agg({
^^
E NameError: name 'df' is not defined
test_red_monthly_report_growth
tests/test_m4.py:95: in test_red_monthly_report_growth
result = red_monthly_report()
^^^^^^^^^^^^^^^^^^^^
homework/m4_timeseries.py:99: in red_monthly_report
report = df.set_index('order_date').resample('ME').agg({
^^
E NameError: name 'df' is not defined
M5 視覺化(10/100 — 10%)
題目
分數
狀態
test_green_bar_category
0/10
❌
test_green_hist_amount
0/10
❌
test_green_set_labels
10/10
✅
test_yellow_line_region_trend
0/15
❌
test_yellow_box_vip
0/15
❌
test_yellow_scatter_price_amount
0/15
❌
test_red_category_dashboard_is_figure
0/13
❌
test_red_category_dashboard_has_4_subplots
0/12
❌
❌ 錯誤提示(點擊展開)
test_green_bar_category
tests/test_m5.py:22: in test_green_bar_category
result = green_bar_category()
^^^^^^^^^^^^^^^^^^^^
homework/m5_visualization.py:32: in green_bar_category
sns.countplot(x='category', data=df)
^^
E NameError: name 'df' is not defined
test_green_hist_amount
tests/test_m5.py:29: in test_green_hist_amount
result = green_hist_amount()
^^^^^^^^^^^^^^^^^^^
homework/m5_visualization.py:42: in green_hist_amount
sns.histplot(df['amount'], bins=20)
^^
E NameError: name 'df' is not defined
test_yellow_line_region_trend
tests/test_m5.py:45: in test_yellow_line_region_trend
result = yellow_line_region_trend()
^^^^^^^^^^^^^^^^^^^^^^^^^^
homework/m5_visualization.py:76: in yellow_line_region_trend
plot_df = df[df['region'].isin(['North', 'South'])].copy()
^^
E NameError: name 'df' ...
test_yellow_box_vip
tests/test_m5.py:53: in test_yellow_box_vip
result = yellow_box_vip()
^^^^^^^^^^^^^^^^
homework/m5_visualization.py:90: in yellow_box_vip
sns.boxplot(x='vip_level', y='amount', data=df)
^^
E NameError: name 'df' is not defined
test_yellow_scatter_price_amount
tests/test_m5.py:58: in test_yellow_scatter_price_amount
result = yellow_scatter_price_amount()
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
homework/m5_visualization.py:100: in yellow_scatter_price_amount
sns.scatterplot(x='unit_price', y='amount', data=df)
...
test_red_category_dashboard_is_figure
tests/test_m5.py:66: in test_red_category_dashboard_is_figure
_assert_is_figure(result, "red_category_dashboard")
tests/test_m5.py:15: in _assert_is_figure
assert result is not None, f"{name}: 函式回傳了 None"
E AssertionError: red_category_dashboard: 函式回傳了 None
E assert None is not None
test_red_category_dashboard_has_4_subplots
tests/test_m5.py:71: in test_red_category_dashboard_has_4_subplots
assert result is not None
E assert None is not None
M6 Plotly Capstone(45/100 — 45%)
題目
分數
狀態
test_green_plotly_bar
0/10
❌
test_green_plotly_line
0/10
❌
test_green_plotly_pie
0/10
❌
test_yellow_clean_and_merge
15/15
✅
test_yellow_kpi_summary
15/15
✅
test_yellow_plotly_scatter
15/15
✅
test_red_dashboard_is_figure
0/13
❌
test_red_dashboard_has_traces
0/12
❌
❌ 錯誤提示(點擊展開)
test_green_plotly_bar
tests/test_m6.py:21: in test_green_plotly_bar
result = green_plotly_bar()
^^^^^^^^^^^^^^^^^^
homework/m6_plotly_capstone.py:28: in green_plotly_bar
df = pd.read_csv('../datasets/ecommerce/orders_enriched.csv')
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
/op...
test_green_plotly_line
tests/test_m6.py:26: in test_green_plotly_line
result = green_plotly_line()
^^^^^^^^^^^^^^^^^^^
homework/m6_plotly_capstone.py:41: in green_plotly_line
df = pd.read_csv('../datasets/ecommerce/orders_enriched.csv')
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^...
test_green_plotly_pie
tests/test_m6.py:31: in test_green_plotly_pie
result = green_plotly_pie()
^^^^^^^^^^^^^^^^^^
homework/m6_plotly_capstone.py:56: in green_plotly_pie
df = pd.read_csv('../datasets/ecommerce/orders_enriched.csv')
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
/op...
test_red_dashboard_is_figure
tests/test_m6.py:69: in test_red_dashboard_is_figure
_assert_is_plotly_figure(result, "red_dashboard")
tests/test_m6.py:14: in _assert_is_plotly_figure
assert result is not None, f"{name}: 函式回傳了 None"
E AssertionError: red_dashboard: 函式回傳了 None
E assert None is not None
test_red_dashboard_has_traces
tests/test_m6.py:73: in test_red_dashboard_has_traces
assert result is not None
E assert None is not None
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
完成作業繳交 - 陳郁文 - AIPE03