12th Standard Syllabus & Materials
12th Standard
TN 12th Computer Applications மின்னணு தரவு பரிமாற்றம் Sample Question Papers Study Material - QB365 Set A
NEW12th Standard
TN 12th Computer Applications மின் - வணிக பாதுகாப்பு அமைப்புகள் Sample Question Papers Study Material - QB365 Set A
NEW12th Standard
TN 12th Computer Applications மின்னணு செலுத்தல் முறைகள் Sample Question Papers Study Material - QB365 Set A
NEW12th Standard
TN 12th Computer Applications மின் - வணிகம் Sample Question Papers Study Material - QB365 Set A
NEW12th Standard
TN 12th Computer Applications திறந்த மூல கருத்துருக்கள் Sample Question Papers Study Material - QB365 Set A
NEW12th Standard
TN 12th Computer Applications வலையமைப்பு வடமிடல் Sample Question Papers Study Material - QB365 Set A

Published on: 27/09/2019
Python and CSV Files
Download Tamil Nadu 12th Standard Computer Science question papers, model tests, one-mark questions, important questions, and public exam papers in PDF format. Free study materials and answer keys for TN State Board students.
Questions + Answers key
Take MCQ Computer Science Test

1.
Write a note an Line Terminator.
2.
What is called modification?
3.
Differentiate writer ( ) and writerow ( )method.
4.
What is an Ordered Dict?
5.
What is the use of dict( )?
6.
How Diet Reader works or What is the use of dictionary key?
7.
Whatis dialect ?
8.
Write a note is register dialect ( ) method?
9.
Write a note an reader ( ).
10.
What is the use of close ( ) method?
11.
How will you sort more than one column from a csv file?Give an example statement.
12.
What is use of next() function?
13.
Mention the default modes of the File.
14.
Mention the two ways to read a CSV file using Python.
15.
What is CSV File?
1.
A Line Terminator is a string used to terminate lines produced by writer. The default value is \r or \n. We can write csv file with a line terminator in Python by registering new dialects using csv. register_dialect ( ) class of csv module.
2.
Making some changes in the data of the existing file or adding more data is called modification.
3.
| writer ( ) | writerow ( ) |
| The csv.writer( ) method returns a writer object which converts the user's data into delimited strings on the given file-like object. | The writerow ( ) method writes a row of data into the specified file. |
4.
DictReader ( ) gives OrderedDict by default in its output. An OrderedDict is a dictionary subclass which saves the order in which its contents are added. To remove the OrderedDict use dict ( ).
5.
The function dict ( ) is used to print the data in dictionary format without order
6.
(i) DictReader works by reading the first line of the CSV and using each comma separated value in this line as a dictionary key.
(ii) The columns in each subsequent row then behave like dictionary values and can be accessed with the appropriate key.
7.
A dialect is a class of csv module which helps to define parameters for reading and writing CSV. It allows to create, store, and re-use various formatting parameters for data.
8.
(i) The whitespaces can be removed, by registering new dialects using csv.register_ dialect ( ) class of csv module.
(ii) A dialect describes the format of the csv file that is to be read, In dialects the parameter "skipinitialspace" is used for removing whitespaces after the delimiter.
9.
(i) To read the contents of CSV file with the help of csv.reader() method. The reader function is designed to take each line of the file and make a list of all columns.
(ii) Then, you just choose the column you want the variable data for. Using this method one can read data from csv files of different formats like quotes (" "), pipe (|) and comma (,).
10.
Closing a file will free up the resources that were tied with the file and is done using Python close ( ) method.
11.
To sort by more than one column you can use itemgetter with multiple indices:
operator.itemgetter
Example:
sortedlist = sorted (data, key = operator. itemgetter(1))
12.
The row heading is get sorted, to avoid the first row should be skipped. This is can be done by using the command "next( )".
13.
The default is reading in text mode. In this mode, while reading from the file the data would be in the format of strings.
14.
15.
A CSV file is a human readable text file where each line has a number of fields, separated by commas or some other delimiter.
12th Standard Syllabus & Materials
12th Standard
TN 12th Computer Applications களப்பெயர் முறைமை (DNS) Sample Question Papers Study Material - QB365 Set A
NEW12th Standard
TN 12th Computer Applications வலையமைப்பு எடுத்துக்காட்டுகள் மற்றும் நெறிமுறைகள் Sample Question Papers Study Material - QB365 Set A
NEW12th Standard
TN 12th Computer Applications கணினி வலையமைப்பு ஓர் அறிமுகம் Sample Question Papers Study Material - QB365 Set A
NEW12th Standard
TN 12th Computer Applications PHP-உடன் MySQL-ஐ இணைத்தல் Sample Question Papers Study Material - QB365 Set A
Tamilnadu Stateboard 12th Standard Subjects

Maths

Chemistry

Physics

Biology

Computer Science

Business Maths and Statistics

Economics

Commerce

Accountancy

History

Computer Applications

Biology

Computer Technology

Computer Applications

Computer Science

Business Maths and Statistics

Commerce

Economics

Maths

Chemistry

Physics

Computer Technology

History

Accountancy

Tamil

English

French
Tamilnadu Stateboard Standards