知识卡片
统一口径再处理
清洗数据要统一同一概念的不同写法,如把类别大小写归一,再对同义缩写做有依据的映射。也要把日期、金额和数量解析为合适的类型。先确认币种或计量单位是否相同,只有表达不同的值可以直接合并。书中金额示例仍保留 USD 文本,不能当作已完成数值转换。
这张卡片看不懂?
这张卡片已通过人工审查,不再接受失败反馈。
已有反馈 · 0 条
还没有人提交反馈。
在整书笔记中的位置
原书出处 · 1 处
- Data Pre-processing · 查看原书依据
Handling inconsistent data often involves identifying and resolving discrepancies or variations in data values that represent the same concept but are not standardized. Here is a Python code example using the pandas library to handle inconsistent data by standardizing values:
参考来源
- 位置:《Simplified Machine Learning: The Essential Building Blocks for Machine Learning Expertise》第 02 章《Data Pre-processing》(`extracted/Simplified Machine Learningː The Essential Building Blocks for Machine Learning Expertise/_epub-src/OPS/ch02.xhtml`,book-source 项目,正文索引第 190 段)
- 结论依据:类别例用小写统一类别,后面的日期和金额示例区分正则清理与日期、数值类型转换。
- 原始内容:Handling inconsistent data often involves identifying and resolving discrepancies or variations in data values that represent the same concept but are not standardized. Here is a Python code example using the pandas library to handle inconsistent data by standardizing values: