Skip to content

完成作業繳交 - 陳郁文 - AIPE03#29

Open
yuwen-web wants to merge 3 commits into
Zenobia0000:mainfrom
yuwen-web:main
Open

完成作業繳交 - 陳郁文 - AIPE03#29
yuwen-web wants to merge 3 commits into
Zenobia0000:mainfrom
yuwen-web:main

Conversation

@yuwen-web

Copy link
Copy Markdown

完成作業繳交 - 陳郁文 - AIPE03

@github-actions

github-actions Bot commented May 3, 2026

Copy link
Copy Markdown

📊 作業批改結果

總分:335 / 600(56%)— 等級 F


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

M1 NumPy(85/100 — 85%)

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

test_yellow_expensive_count

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

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