Inspecting Data Using .iterrows()

Brent Smart
Jul 12, 2022

--

Photo by Alexander Sinn on Unsplash

In this blog I continue working with student data collected by various teachers across an entire school. Cleaning and formatting the data is an essential step to the correct function of different algorithms. I wanted a more detailed view of student’s academic records in a way that can be easily read without printing the entire data frame. I used a for loop and the .iterrows() method to print out the data for each row from specific columns.

Results of .iterrows()

I could have printed any column from the data frame, but I was only interested in comparing students’ Beginning of Year (BOY) and Middle of Year (MOY) reading levels.

That’s it! Hope this was helpful — if so clap!

--

--