10 Important Questions of CSV File in Python with Solution

Share with others

CSV File in Python
CSV File in Python

Important Questions of CSV File in Python

Q1. Write a program to read entire data from file data.csv

Important Questions of CSV File in Python

Q2. Write a program to search the record from “data.csv” according to the admission number input from the user. Structure of record saved in “data.csv” is Adm_no, Name, Class, Section, Marks

Important Questions of CSV File in Python

Q3. Write a program to add/insert records in file “data.csv”. Structure of a record is roll number, name and class.

Important Questions of CSV File in Python

Q4. Write a program to copy the data from “data.csv” to “temp.csv”

Important Questions of CSV File in Python

Q5. Write a program to read all content of “student.csv” and display records of only those students who scored more than 80 marks. Records stored in students is in format : Rollno, Name, Marks


Important Questions of CSV File in Python

Q6. Write a program to display all the records from product.csv whose price is more than 300. Format of record stored in product.csv is product id, product name, price,.


 

Important Questions of CSV File in Python

Q7. Write a program to calculate the sum of all the marks given in the file “marks.csv. Records in “marks.csv” are as follows :

Rollno, Name, Marks
1, Suman, 67
2, Aman,71
3, Mini, 68
4, Amit, 80

Important Questions of CSV File in Python

Q8. Write a program to count number of records present in “data.csv” file.

Important Questions of CSV File in Python

Q9. Write a program to modify the record of a student in a file “data.csv”. Following records are saved in file.

Rollno, Name, Marks
1, Aman, 35
2, Kanak, 1
3, Anuj, 33
4, suman, 25

Important Questions of CSV File in Python

Q10. Write a program to show the detail of the student who scored the highest marks. Data stored in “Data.csv” is given below :

Rollno, Name, Marks
1, Aman, 35
2, Kanak, 1
3, Anuj, 33
4, suman, 25

Related Post

10 Important Questions of Binary File Handling in Python

10 Important Questions of Text File Handling in Python

40+ Important Python File Handling Practice Questions

Handout of Text File Handling in Python

Handout of Binary File Handling in Python


Class 12 Computer Science Sample Paper 2020-2021.

Class 12 Computer Science Sample Paper Marking Scheme

Class 12 Computer Science Test Series


Share with others

Leave a Reply

error: Content is protected !!