1. Învăţa
  2. /
  3. Courses
  4. /
  5. Data Manipulation with pandas

Connected

exercise

Parts of a DataFrame

To better understand DataFrame objects, it's useful to know that they consist of three components:

  • values: A two-dimensional NumPy array, accessed via the .to_numpy() method.
  • columns: An index of column names, accessed via the .columns attribute.
  • index: An index for the rows, accessed via the .index attribute.

You can usually think of indexes as a list of strings or numbers, though the pandas Index data type allows for more sophisticated options. (These will be covered later in the course.)

homelessness is available.

Instrucțiuni

100 XP
  • Import pandas using the alias pd.
  • Print a 2D NumPy array of the values in homelessness.
  • Print the column names of homelessness.
  • Print the index of homelessness.