def calc_pct_reliability(df_pct):
    """
    Calculates percent reliability of interstate and non-interstate network.
    Args: df_pct, a pandas dataframe. 
    Returns: int_rel_pct, % interstate reliability.
             non_int_rel_pct, % non interstate reliability. 
    """
    # Auto, Bus interstate
    df_int = df_pct.loc[df_pct['interstate'] == 1]
    df_int_sum = df_int['ttr'].sum()
    df_int_rel = df_int.loc[df_int['reliable'] == 1]
    int_rel_pct = df_int_rel['ttr'].sum() / df_int_sum
    
    # Auto, Bus non-interstate
    df_non_int = df_pct.loc[df_pct['interstate'] != 1]
    df_non_int_sum = df_non_int['ttr'].sum()
    df_non_int_rel = df_non_int.loc[df_non_int['reliable'] == 1]
    non_int_rel_pct = df_non_int_rel['ttr'].sum() / df_non_int_sum

    return int_rel_pct, non_int_rel_pct