Exploring Data with Pandas Intermediate

In the previous lesson on pandas fundamentals, you learned some of the built-in functions and methods that make exploring and analyzing data easier with pandas. In this lesson, you’ll continue working with the same real-world dataset as you learn more advanced selection and exploration techniques

We’ll dig into concepts such as using iloc to select by integer position, and make reading CSV files into pandas much simpler using pandas.read_csv(). You’ll learn pandas methods to create boolean masks and boolean arrays, using aggregation to perform advanced analysis using Python for loops within pandas, and more!

At the end of the lesson, you will create a column to contain a metric called return on assets (ROA). ROA is a business-specific metric which indicates a company’s ability to make a profit using their available assets.

As with every lesson at Dataquest, you’ll be given an opportunity to practice each concept using our code editor with built-in answer checking to ensure that you’ve mastered a concept before moving on to this next.


  • Learn how to select data in pandas by location.
  • Learn how to use boolean masks in pandas to create complex filters.
  • Learn more pandas methods for data analysis.

Lesson Outline

  1. Introduction
  2. Reading CSV files with pandas
  3. Using iloc to select by integer position
  4. Using iloc to select by integer position continued
  5. Using pandas methods to create boolean masks
  6. Working with Integer Labels
  7. Pandas Index Alignment
  8. Using Boolean Operators
  9. Using Boolean Operators Continued
  10. Sorting Values
  11. Using Loops with pandas
  12. Challenge: Calculating Return on Assets by Country
  13. Next Steps
  14. Takeaways

Get started for free

No credit card required.

Or With

By creating an account you agree to accept our terms of use and privacy policy.