6.
What are csv files?
Ans. CSV files are comma separated values files. These are the delimited files when mostly comma is used to separate the values stored. These files have the extension .csv. An excel file is automatically created as we write the data in the csv file.
7.
What is the significance of ‘newline’ argument in file open() function?
Ans. The argument newline=” ensures that no end of line translation would take place while storing the file contents on the disk. It also ensures that these files can be used on different platforms.
8.
what is pickling and unpickling process?
Ans. The pickling or serialization is the process of converting Python object in to a byte stream so that it can be written into a binary file. The unpickling is inverse of pickling where byte stream is converted back into an Python object.
9.
what is the difference between regular text files and delimited text file?
Ans. Regular text files are the files in which text si stored in teh same format as it is types. In these files each line ends wiht a new line character and EOL translation takes place. these files have extension .txt. Delimited text files are also text files where specific charcter is stored to separate the values i.e. after each value a comma ‘,’.
10.
What is the function of csv.writer object and csv.reader object?
Ans. The csv.writer object adds delimitation to the user data prior to storing daat in the csv file on storage disk. The csv.reader object reads the data from a csv file, removes the delimitation (parses) and loads the data into a python iterable wherefrom we can fetch the data row by row using for loop.