What does the content of a CSV file look like?


#1

Question

What does the content of a CSV file look like?

Answer

A CSV file will contain lines of data that have column values separated by commas.

For example, the contents of a CSV file may look like the following, where each row contains an item, year and information on whether it is in stock or not. Each row would be like a row in a database.

Example CSV file contents

earbuds,2016,out of stock
speakers,2012,in stock
microphone,2017,in stock
charger,2018,in stock