Learn practical skills, build real-world projects, and advance your career

AI for Medicine Course 3 Week 1 lecture notebook

Pandas for a Medical Dataset

Welcome to this lecture notebook! In this week's graded assignment, you will be using pandas quite often to work with dataframes.

  • To get you ready for assignment, you'll familiarize yourself with some objects in the pandas library, along with their data types.
  • Then you'll see how you can leverage pandas to get information from a dataset.

Import Library

# import libraries
import pandas as pd

Load your data and check its shape

pandas.read_csv takes in a file name, assuming that the file is formatted as comma separated values (csv).

  • You can choose one of the columns to be the row 'index', which is an ID associated with each row.