def explode(df, column, sep='|', keep=False):
    """
    Split the values of a column and expand so the new DataFrame has one value per row. 
    Filters rows where the column is missing.
    
    :param df: pandas.DataFrame - dataframe with a column to split and expand
    :param column: str - the column to split and expand
    :param sep: str - the string used to split the column's values
    :param keep: bool -whether to retain the presplit value as it's own row
    :return: pandas.DataFrame - dataframe with the same columns as `df`.
    """
    indexes = list()
    new_values = list()
    df = df.dropna(subset=[column])
    for i, presplit in enumerate(df[column].astype(str)):
        values = presplit.split(sep)
        if keep and len(values) > 1:
            indexes.append(i)
            new_values.append(presplit)
        for value in values:
            indexes.append(i)
            new_values.append(value)
    new_df = df.iloc[(indexes), :].copy()
    new_df[column] = new_values
    return new_df
