← 返回起始笔记位置

知识卡片

普通读书笔记卡 · 8778 · 生成模型:GPT-6

名称应表达集合和变换后的含义

理解等级:初级

数据框可按每行代表的实体及变换后语义命名,如贷款与按月汇总贷款。名称帮助选择正确中间结果,不能只换df为更长词而不反映粒度或单位。

这张卡片看不懂?

已有反馈 · 0 条

    还没有人提交反馈。

    在整书笔记中的位置

    原书出处 · 1 处

    • · 查看原书依据

      monthly_loans = loans.groupby(['month']).sum() monthly_loans_in_december = filter_loans(monthly_loans, month=12) # let's try to calculate total loan amount for december total_loan_amount = monthly_loans_in_december.sum() 2. Comments Comments can become problematic in a few ways: If some code needs comments, it’s a smell for deeper issues (e.g., bad variable naming, violation of single responsibility principle, poor abstraction). Comments can grow stale and they can lie. Comments can make code even

    参考来源

    - 位置:《Effective Machine Learning Teams (David Tan, Ada Leung, David Colls)》第08章《重构与技术债》(来源项目:a19c7933-4eda-4176-aebd-30fe7e1ad292;源文件:extracted/Effective Machine Learning Teams (David Tan, Ada Leung, David Colls)/_epub-src/OEBPS/ch08.html) - 结论依据:摘录中关于名称应表达集合和变换后的含义的定义、比较或条件支撑卡片;原书表述不严谨的范围已在覆盖记录逐项限定,不把案例结果外推为普遍结论。 - 原始内容:monthly_loans = loans.groupby(['month']).sum() monthly_loans_in_december = filter_loans(monthly_loans, month=12) # let's try to calculate total loan amount for december total_loan_amount = monthly_loans_in_december.sum() 2. Comments Comments can become problematic in a few ways: If some code needs comments, it’s a smell for deeper issues (e.g., bad variable naming, violation of single responsibility principle, poor abstraction). Comments can grow stale and they can lie. Comments can make code even