def test_raster_statistics_column_names_novector(self): """ Test that column_names property matches head(0) for RasterStatistics when vector is None """ r = RasterStatistics(raster="worldpop_gambia") assert r.head(0).columns.tolist() == r.column_names
def test_raster_statistics_column_names_vector(self): """ Test that column_names property matches head(0) for RasterStatistics when vector is not None """ vector = Table(schema="public", name="gambia_admin2") r = RasterStatistics(raster="worldpop_gambia", vector=vector, grouping_element="district_c") assert r.head(0).columns.tolist() == r.column_names