def points_to_df()

in src/data_utils.py [0:0]


def points_to_df(pts_geo):
    """Converts a feature collection into a pandas dataframe

    Args:
        pts_geo: collection of pixels on an image

    Returns:
        df_geo: dataframe containing bands and coordinates of pixels
    """
    df_geo = ee_to_geopandas(pts_geo)
    df_geo = df_geo.drop_duplicates()
    df_geo["x"] = df_geo["geometry"].x
    df_geo["y"] = df_geo["geometry"].y
    df_geo = df_geo.drop("geometry", axis=1)

    return df_geo