def init_terminals(terminals):
    """
    Initialize the dataframe of the terminals (*terminals*) by removing the
    columns '_id', '_geometry', '_weight' and adding the column 'connected' ;
    in-place.

    The 'connected' column is filled with booleans, True if the terminal is
    connected to the district heating network and false otherwise.

    Parameters
    ----------
    terminals: DataFrame
        Dataframe of the terminals as returned by the module *dhd.evolve*, namely
        with all possible connections.
    """
    terminals['connected'] = True
    for idx, terminal in terminals.iterrows():
        if len(terminal['_id']) == 0:
            terminals.at[idx, 'connected'] = False
    terminals.drop(columns=['_id', '_geometry', '_weight'], inplace=True)
