1. Học hỏi
  2. /
  3. Khoa Học
  4. /
  5. Data Manipulation with pandas

Connected

Bài tập

Parts of a DataFrame

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

  • .values: A two-dimensional NumPy array of values.
  • .columns: An index of columns: the column names.
  • .index: An index for the rows: either row numbers or row names.

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.

Hướng dẫn

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.