Ravindra BagaleCourses & study guides

5. pandas DataFrames and Series

5.2 head, info, dtypes

Steps in Jupyter

  1. Run the DataFrame code above.
  2. df.head() — first 5 rows (here all 3).
  3. df.shape — (3, 7) means 3 rows, 7 columns.
  4. df.info() — non-null counts and dtypes.
  5. df.dtypes — column types only.
  6. df.describe() — numeric summary (qty, amount).
  7. df["city"] or df.city — one Series.

What you should see. amount and qty as int64; text columns as object (string). Cancelled row still appears — filtering comes in Chapter 6.

Ravindra Bagale's Tip

Khup students df.city vaprun column names with spaces break kartat. Safe habit: df["order id"] square brackets. Spaces/asli columns rename karun order_id sara. Bilkul visru naka.