def extract_by_primary_key(df, primary_keys,
                           primary_key_column = 'borehole_id'):
    """
    
    :param df: pandas dataframe
    :param primary_keys: sequence of primary key values
    :param primary_key_column:
    :return:
    subset of data in pandas dataframe
    """

    # If the parameter input is an integer and not a list make it a list
    if isinstance(primary_keys, (int, float, str)):
        primary_keys = [primary_keys]

    # Create a mask based on the primary key
    mask = df[primary_key_column].isin(primary_keys)
    #Apply mask
    df_subset = df[mask]

    if len( df_subset) > 0:
        return  df_subset
    # If it is empty return none
    else:
        return None