def region_filters(DF, lon_min, lon_max, lat_min, lat_max, shapefile=False):
    """Takes a Dataframe with the all the rivers information and filters the data
    from the rivers in an especific region.

    Parameters
    ----------
    DF: Dataframe
        is the River_sources dataframe.
    lat_min, lat_max, lon_min, lon_max: float, float, float float
        domain limits.
    shapefile: bool, optional
        True when dealing with a geopandas Dataframe.

    Returns
    -------
    new_DF: Dataframe
        a pandas Dataframe rivers in the especific region.
    """
    if shapefile:
        X = DF.geometry.x
        Y = DF.geometry.y
    else:
        X = DF['X']
        Y = DF['Y']

    mask = (X <= lon_max) & (X > lon_min) & (Y <= lat_max) & (Y > lat_min)

    new_DF = DF[mask]
    return new_DF