def _fix_pdb_ins_code(table):
    """
    Utility that fixes the 'pdbx_PDB_ins_code' column to match what is expected
    in the mmCIF format.

    :param table: pandas DataFrame object
    :return: returns a modified pandas DataFrame
    """
    table['validation_icode'] = table['validation_icode'].str.replace('\\ |',
        '?')
    table['validation_icode'] = table['validation_icode'].fillna('?').astype(
        str)
    return table
