diff --git a/2-7.py b/2-7.py index bf25422..0591183 100644 --- a/2-7.py +++ b/2-7.py @@ -57,12 +57,4 @@ if __name__ == "__main__": ) # 获取最多的五天 - top_5_days = errDateSorted.take(5) - - # 输出前五天及其 404 错误记录 - print("404 错误记录最多的五天及对应次数:") - for i, (day, count) in enumerate(top_5_days): - print(f"第 {i + 1} 天: {day} => {count} 次 404 错误") - - # 停止 Spark - sc.stop() + top_5_days = errDateSorted