def create_is_missing(df, cols):
    """
    Creates a new column with 1 in the places where the 'cols' have missing
    values.

    Args:
        df (pandas.DataFrame): Any dataframe with missing data.
        cols (list(str)): The names of the columns to use.
    Returns:
        pandas.DataFrame: The same as df but with the added columns.
    """
    missing_df = df[cols].isnull().astype(int).rename(columns={
        c: c + '_missing' for c in cols})
    return df.join(missing_df)