def set_default_weight_to_length(vertices):
    """
    Add weight column to the dataframe *vertices* with element equal to the
    length of the associated geometry ; in-place.

    Parameters
    ----------
    vertices: DataFrame
        Dataframe of the vertices.
    """
    for idx, vertex in vertices.iterrows():
        vertices.loc[idx, 'weight'] = vertex['geometry'].length
