CSV

CSV stands for comma-separated values. It's a very popular data format for public data. A CSV file is a text file that emulates a table. It usually contains one header row with the names of the columns, and one or more data rows containing value fields. Rows are separated by line breaks, and the comma-separated fields in each row form columns. It maps perfectly to an HTML table. This is a simple CSV file containing the population and land area of seven continents (Data/sample.csv):

 continent,population,areakm2
"North America",579024000,24490000
"Asia",4436224000,43820000
"Europe",738849000,10180000
"Africa",1216130000,30370000
"South America",422535000,17840000
"Oceania",39901000,9008500
"Antarctica",1106,13720000

There are no types in CVS. Quotes are used to contain text that might contain the delimiter. They are not necessary if the fields don't contain a comma.

CSV is also used to refer to similar files that don't use a comma as a delimiter. These files are more accurately called delimiter-separated value (DSV) files. The most common delimiters are tabs (TSV), vertical bars (|), and semicolons.

CSVs may become corrupt and unreadable, but it's text and you can fix it. Missing or unescaped commas are the most common problems.

..................Content has been hidden....................

You can't read the all page of ebook, please click here login for view all page.
Reset