Page 138 - PYTHON-12
P. 138

Files in the CSV format can be imported
              to and exported from programs that store
              data in tables, such as Microsoft Excel or
              OpenOffice Calc.
              Already defined, CSV stands for “comma
              separated values”. Thus, we can say that
              a comma-separated file is a delimited text
                                                                       Fig. 4.1: CSV Storage Format
              file that uses a comma to separate values.


















                                                 Fig. 4.2: Features of a CSV file

              Each line in a file is known as data/record. Each record consists of one or more fields, separated
              by commas (also known as delimiters), i.e., each of the records is also a part of this file. Tabular data
              is stored as text in a CSV file. The use of comma as a field separator is the source of the name for
              this file format. It stores our data into a spreadsheet or a database.

               CTM: The most commonly used delimiter in a CSV file is usually a comma.


              4.14 WHY USE CSV


              With the use of social networking sites and its various associated applications being extensively
              used requires the handling of huge data. The problem arises as to how to handle and organize this
              large unstructured data as shown in the Fig. 4.3(a) given below.



















                                                                                                                  Python Libraries





                                               Fig. 4.3(a): Problem of Huge Data
                                                                                                             4.9
   133   134   135   136   137   138   139   140   141   142   143