CardiovascularDisease/CVD/main.py
def load():
    """ Import data and rename the columns """

    df = pd.read_csv("../cardio_data.csv", index_col="id")

    # Improve column names for readability
    df.rename(str.capitalize, axis='columns', inplace=True)
    df.rename(columns={'Ap_hi': 'BP_hi', 'Ap_lo': 'BP_lo', 'Gluc': 'Glucose', 'Alco': 'Alcohol'},
              inplace=True)

    return df
 Import data and rename the columns 
Import data and rename the columns
Import data and rename the columns
def load():
    df = pd.read_csv("../cardio_data.csv", index_col="id")
    df.rename(str.capitalize, axis='columns', inplace=True)
    df.rename(columns={'Ap_hi': 'BP_hi', 'Ap_lo': 'BP_lo', 'Gluc': 'Glucose', 'Alco': 'Alcohol'},
              inplace=True)
    return df
def load ( ) : df = pd . read_csv ( "../cardio_data.csv" , index_col = "id" ) df . rename ( str . capitalize , axis = 'columns' , inplace = True ) df . rename ( columns = { 'Ap_hi' : 'BP_hi' , 'Ap_lo' : 'BP_lo' , 'Gluc' : 'Glucose' , 'Alco' : 'Alcohol' } , inplace = True ) return df
Import data and rename the columns
Import data and rename the columns
""" Import data and rename the columns """ # Improve column names for readability