Finding a house with the largest area and returning who lives there (no pandas)
One simple way you can do this is by creating a variable called to track the largest house area. Let's call this largest_area and set it to the value 0 (assuming all house areas in your CSV are greater than 0).
Then using, the csv library, go through each row in the CSV file, grab the house_area, and compare it to the largest_area variable you created. If it is greater, update largest_area, otherwise ignore and continue through the CSV file.
After you have finished going through the CSV file, the greatest area should be in your largest_area variable.
I am new to python and am struggling with this code. I have a csv file and am trying to create a function. The file, personal_info.csv , has a few columns with one labeled house_area and one named full_name. I am trying to create a code that will find the house with the largest area and return the name of person who owns it.
I am also not allowed to import anything besides the csv file, so I cannot use pandas.
Here's what some of the data looks like:




house_area
full_name




40.132
John Smith


85.832
Anna Lee


38.427
Emma Jones




So in this small sample I'm trying to find the house with the largest area (85.832) and print the person's name, Anna Lee. Except the actual file has a lot more rows