|
14 | 14 |
|
15 | 15 | -------------- |
16 | 16 |
|
17 | | -The so-called CSV (Comma Separated Values) format is the most common import and |
18 | | -export format for spreadsheets and databases. CSV format was used for many |
19 | | -years prior to attempts to describe the format in a standardized way in |
20 | | -:rfc:`4180`. The lack of a well-defined standard means that subtle differences |
21 | | -often exist in the data produced and consumed by different applications. These |
22 | | -differences can make it annoying to process CSV files from multiple sources. |
23 | | -Still, while the delimiters and quoting characters vary, the overall format is |
24 | | -similar enough that it is possible to write a single module which can |
25 | | -efficiently manipulate such data, hiding the details of reading and writing the |
26 | | -data from the programmer. |
| 17 | +The Comma Separated Values (CSV) format is the most common import and |
| 18 | +export format for spreadsheets and databases. The basic format is columns |
| 19 | +of text data separated by a comma delimiter. The standards for CSV data are |
| 20 | +defined in :rfc:`4180`. |
| 21 | + |
| 22 | +The CSV format was used for many years before the standards were defined, and |
| 23 | +adherence to the standards is inconsistent. As a result, there can be variations |
| 24 | +in the delimiters and quoting characters in the CSV data that is produced and |
| 25 | +consumed by different applications. These differences can make it troublesome to |
| 26 | +process CSV files from multiple sources. However, the basic format is standard enough |
| 27 | +that a single module can efficiently manipulate this data and enable the programmer to |
| 28 | +read and write files without having to account for inconsistencies. |
27 | 29 |
|
28 | 30 | The :mod:`csv` module implements classes to read and write tabular data in CSV |
29 | | -format. It allows programmers to say, "write this data in the format preferred |
30 | | -by Excel," or "read data from this file which was generated by Excel," without |
31 | | -knowing the precise details of the CSV format used by Excel. Programmers can |
32 | | -also describe the CSV formats understood by other applications or define their |
33 | | -own special-purpose CSV formats. |
| 31 | +format. For example, the module enables programmers to say, "write this data in the |
| 32 | +format preferred by Excel," or "read data from this file which was generated by Excel," |
| 33 | +without knowing the precise details of the CSV format that is used by Excel. Programmers |
| 34 | +can also describe CSV formats that are used by other applications or define custom CSV |
| 35 | +formats for specific use cases. |
34 | 36 |
|
35 | 37 | The :mod:`csv` module's :class:`reader` and :class:`writer` objects read and |
36 | 38 | write sequences. Programmers can also read and write data in dictionary form |
|
0 commit comments