A CSV file "Happiness.csv" contains survey data. Each record in the file…
A CSV file "Happiness.csv" contains survey data. Each record in the file includes:
Name of a country
Population of the country
Sample Size (Number of persons who participated in the survey in that country)
Happy (Number of persons who reported being happy)
For example, a sample record may be:
['Signiland', 5673000, 5000, 3426]
Write Python functions to perform the following operations on the file:
Read all the data from the file into a list and display the records where the population is more than 5,000,000.
Count and display the total number of records present in the file.
Attempted by 64 students.
Sign up free to check your answer
Sign up freeLoading lesson…

