通过检测行模式和类型模式来处理混乱的CSV文件
Wrangling Messy CSV Files by Detecting Row and Type Patterns
摘要:
众所周知,数据科学家将大部分时间用于准备数据进行分析。此准备阶段的第一步是从原始存储格式加载数据。逗号分隔值(CSV)文件是一种流行的表格数据格式,因为它们简单且表面上易于使用。然而,CSV文件的格式标准并没有得到一致的遵守,因此每个文件都需要手动检查,并可能在加载数据之前进行修复,这对于一项应该是数据科学最简单部分之一的任务来说是一种巨大的人力浪费。从CSV文件中检索数据的第一步也是最重要的一步是确定文件的方言,例如单元格的后缀和引号字符。现有的方言检测方法数量少,鲁棒性差。在本文中,我们提出了一种方言检测方法的基础上,一种新的措施的数据一致性的解析数据文件。我们的方法在真实世界CSV文件的大型语料库上实现了97%的整体准确率,与现有方法(包括Python标准库中的方法)相比,在杂乱的CSV文件上的准确率提高了近22%。
英文摘要:
It is well known that data scientists spend the majority of their time on preparing data for analysis. One of the first steps in this preparation phase is to load the data from the raw storage format. Comma-separated value (CSV) files are a popular format for tabular data due to their simplicity and ostensible ease of use. However, formatting standards for CSV files are not followed consistently, so each file requires manual inspection and potentially repair before the data can be loaded, an enormous waste of human effort for a task that should be one of the simplest parts of data science. The first and most essential step in retrieving data from CSV files is deciding on the dialect of the file, such as the cell delimiter and quote character. Existing dialect detection approaches are few and non-robust. In this paper, we propose a dialect detection method based on a novel measure of data consistency of parsed data files. Our method achieves 97% overall accuracy on a large corpus of real-world CSV files and improves the accuracy on messy CSV files by almost 22% compared to existing approaches, including those in the Python standard library.
机构、总结、中文摘要均由AI分析而来,可能存在错误,请以论文正文为准。