Skip to content

完成作業繳交-林妤軒-AIPE03#18

Open
qwe789142 wants to merge 2 commits into
Zenobia0000:mainfrom
qwe789142:main
Open

完成作業繳交-林妤軒-AIPE03#18
qwe789142 wants to merge 2 commits into
Zenobia0000:mainfrom
qwe789142:main

Conversation

@qwe789142

Copy link
Copy Markdown

完成作業繳交-林妤軒-AIPE03

@github-actions

github-actions Bot commented May 3, 2026

Copy link
Copy Markdown

📊 作業批改結果

總分:400 / 600(67%)— 等級 D


💡 完整解答請到你自己 fork 的 repo → Actions 頁籤查看。

M1 NumPy(80/100 — 80%)

題目 分數 狀態
test_green_mean 10/10
test_green_double 10/10
test_green_filter 10/10
test_yellow_expensive_count 15/15
test_yellow_top3_stock_indices 15/15
test_yellow_restock_cost 15/15
test_red_double11_prices 0/20
test_red_no_forloop 5/5
❌ 錯誤提示(點擊展開)

test_red_double11_prices

tests/test_m1.py:91: in test_red_double11_prices
    np.testing.assert_allclose(result, expected, rtol=1e-7, err_msg="雙 11 售價計算有誤")
/opt/hostedtoolcache/Python/3.11.15/x64/lib/python3.11/contextlib.py:81: in inner
    return func(*args, **kwds)
           ^^^^^^^^^^^^^^^^^^^
E   AssertionError: 
E  ...

M2 Pandas 清理(75/100 — 75%)

題目 分數 狀態
test_green_read_csv 0/10
test_green_shape 10/10
test_green_dtypes 10/10
test_yellow_clean_columns 15/15
test_yellow_clean_amount 0/15
test_yellow_drop_duplicates 15/15
test_red_clean_orders_returns_df 4/4
test_red_clean_orders_columns 4/4
test_red_clean_orders_amount_is_numeric 4/4
test_red_clean_orders_date_is_datetime 5/5
test_red_clean_orders_no_nulls 4/4
test_red_clean_orders_no_duplicates 4/4
❌ 錯誤提示(點擊展開)

test_green_read_csv

tests/test_m2.py:17: in test_green_read_csv
    result = green_read_csv()
             ^^^^^^^^^^^^^^^^
homework/m2_pandas_cleaning.py:24: in green_read_csv
    df = pd.read_csv(DATA)
         ^^^^^^^^^^^^^^^^^
/opt/hostedtoolcache/Python/3.11.15/x64/lib/python3.11/site-packages/pandas/io/parsers/re...

test_yellow_clean_amount

tests/test_m2.py:46: in test_yellow_clean_amount
    assert result["amount"].dtype in ["float64", "float32"], \
           ^^^^^^^^^^^^^^^^
/opt/hostedtoolcache/Python/3.11.15/x64/lib/python3.11/site-packages/pandas/core/series.py:1121: in __getitem__
    return self._get_value(key)
           ^^^^^...

M3 Pandas 進階(50/100 — 50%)

題目 分數 狀態
test_green_load_and_merge 10/10
test_green_row_count 10/10
test_green_column_list 0/10
test_yellow_top_category 0/15
test_yellow_gold_vip_stats 15/15
test_yellow_region_avg_amount 15/15
test_red_rfm_top5_shape 0/9
test_red_rfm_top5_columns 0/8
test_red_rfm_top5_sorted_by_m 0/8
❌ 錯誤提示(點擊展開)

test_green_column_list

tests/test_m3.py:35: in test_green_column_list
    assert isinstance(result, list)
E   AssertionError: assert False
E    +  where False = isinstance(Index(['order_id', 'customer_id', 'product_id', 'qty', 'order_date', 'amount',\n       'customer_name', 'region', 'signup_date', 'vip_level', 'product_...

test_yellow_top_category

tests/test_m3.py:44: in test_yellow_top_category
    assert result == expected, f"預期 '{expected}',你的結果: '{result}'"
/opt/hostedtoolcache/Python/3.11.15/x64/lib/python3.11/site-packages/pandas/core/generic.py:1577: in __nonzero__
    raise ValueError(
E   ValueError: The truth value of a Series is am...

test_red_rfm_top5_shape

tests/test_m3.py:70: in test_red_rfm_top5_shape
    result = red_rfm_top5(ref_df)
             ^^^^^^^^^^^^^^^^^^^^
homework/m3_pandas_advanced.py:157: in red_rfm_top5
    .sort_values("M", ascending=False)
     ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
/opt/hostedtoolcache/Python/3.11.15/x64/lib/python3.11...

test_red_rfm_top5_columns

tests/test_m3.py:76: in test_red_rfm_top5_columns
    result = red_rfm_top5(ref_df)
             ^^^^^^^^^^^^^^^^^^^^
homework/m3_pandas_advanced.py:157: in red_rfm_top5
    .sort_values("M", ascending=False)
     ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
/opt/hostedtoolcache/Python/3.11.15/x64/lib/python3....

test_red_rfm_top5_sorted_by_m

tests/test_m3.py:83: in test_red_rfm_top5_sorted_by_m
    result = red_rfm_top5(ref_df)
             ^^^^^^^^^^^^^^^^^^^^
homework/m3_pandas_advanced.py:157: in red_rfm_top5
    .sort_values("M", ascending=False)
     ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
/opt/hostedtoolcache/Python/3.11.15/x64/lib/pyth...

M4 時間序列(75/100 — 75%)

題目 分數 狀態
test_green_avg_by_month 10/10
test_green_top3_dates 10/10
test_green_date_range 10/10
test_yellow_monthly_revenue 15/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_red_monthly_report_columns

tests/test_m4.py:85: in test_red_monthly_report_columns
    assert not missing, f"缺少欄位: {missing}"
E   AssertionError: 缺少欄位: {'revenue_growth', 'order_count', 'revenue', 'active_customers', 'avg_order_value'}
E   assert not {'active_customers', 'avg_order_value', 'order_count', 'revenue', 'revenue_g...

test_red_monthly_report_values

/opt/hostedtoolcache/Python/3.11.15/x64/lib/python3.11/site-packages/pandas/core/indexes/base.py:3805: in get_loc
    return self._engine.get_loc(casted_key)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
index.pyx:167: in pandas._libs.index.IndexEngine.get_loc
    ???
index.pyx:196: in pandas._libs.in...

test_red_monthly_report_growth

/opt/hostedtoolcache/Python/3.11.15/x64/lib/python3.11/site-packages/pandas/core/indexes/base.py:3805: in get_loc
    return self._engine.get_loc(casted_key)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
index.pyx:167: in pandas._libs.index.IndexEngine.get_loc
    ???
index.pyx:196: in pandas._libs.in...

M5 視覺化(60/100 — 60%)

題目 分數 狀態
test_green_bar_category 10/10
test_green_hist_amount 10/10
test_green_set_labels 10/10
test_yellow_line_region_trend 0/15
test_yellow_box_vip 15/15
test_yellow_scatter_price_amount 15/15
test_red_category_dashboard_is_figure 0/13
test_red_category_dashboard_has_4_subplots 0/12
❌ 錯誤提示(點擊展開)

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:109: in yellow_line_region_trend
    ns_df.groupby(['month', 'region'])['amount']
    ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
/opt/hostedtoolc...

test_red_category_dashboard_is_figure

tests/test_m5.py:65: in test_red_category_dashboard_is_figure
    result = red_category_dashboard("Electronics")
             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
homework/m5_visualization.py:188: in red_category_dashboard
    elec_monthly = elec.groupby('month')['amount'].sum().reset_index()
     ...

test_red_category_dashboard_has_4_subplots

tests/test_m5.py:70: in test_red_category_dashboard_has_4_subplots
    result = red_category_dashboard("Electronics")
             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
homework/m5_visualization.py:188: in red_category_dashboard
    elec_monthly = elec.groupby('month')['amount'].sum().reset_index()
...

M6 Plotly Capstone(60/100 — 60%)

題目 分數 狀態
test_green_plotly_bar 10/10
test_green_plotly_line 10/10
test_green_plotly_pie 10/10
test_yellow_clean_and_merge 15/15
test_yellow_kpi_summary 0/15
test_yellow_plotly_scatter 15/15
test_red_dashboard_is_figure 0/13
test_red_dashboard_has_traces 0/12
❌ 錯誤提示(點擊展開)

test_yellow_kpi_summary

tests/test_m6.py:55: in test_yellow_kpi_summary
    assert required.issubset(set(result.keys())), \
E   AssertionError: 缺少 key: {'total_revenue', 'active_customers', 'order_count', 'avg_order_value'}
E   assert False
E    +  where False = <built-in method issubset of set object at 0x7ff2d1b4d2a0>({'...

test_red_dashboard_is_figure

tests/test_m6.py:68: in test_red_dashboard_is_figure
    result = red_dashboard()
             ^^^^^^^^^^^^^^^
homework/m6_plotly_capstone.py:221: in red_dashboard
    monthly     = enriched.groupby('month', as_index=False)['amount'].sum()
                  ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
...

test_red_dashboard_has_traces

tests/test_m6.py:72: in test_red_dashboard_has_traces
    result = red_dashboard()
             ^^^^^^^^^^^^^^^
homework/m6_plotly_capstone.py:221: in red_dashboard
    monthly     = enriched.groupby('month', as_index=False)['amount'].sum()
                  ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^...

@github-actions github-actions Bot added score:D and removed score:F labels May 3, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant