Exercise

Explore a pandas DataFrame

The pandas DataFrame is one of the most important (and most convenient) data structures in Python and especially in Data Science. Not only is the DataFrame structure itself in a familiar tabular format, the pandas package has several ways that allow quick DataFrame exploration. In this exercise, you'll use a (very) small set of the available methods and attributes in pandas to explore the avocados DataFrame.

Instructions 1/4

undefined XP
  • 1

    Print out the "head" or the first few rows of the avocados DataFrame.

  • 2

    Use the .head() method again, but this time supply the value 10 to the n argument.

  • 3

    Use the analogous method, .tail() to view the last 5 rows of the avocados DataFrame.

  • 4

    View the column names of avocados.