CSV File Handling
CSV File Handling
CSV (Comma Separated Values) is a simple file format used to store tabular data, such as a
spreadsheet or database. A CSV file stores tabular data (numbers and text) in plain text. Each
line of the file is a data record. Each record consists of one or more fields, separated by
commas. The use of the comma as a field separator is the source of the name for this file
format.
For working CSV files in Python, there is an inbuilt module called csv.
# field names
fields = ['Name', 'Branch', 'Year', 'CGPA']
# field names
fields = ['name', 'branch', 'year', 'cgpa']