Skip to content

Commit

Permalink
Add test to ensure non-numeric aggregations work
Browse files Browse the repository at this point in the history
  • Loading branch information
philippjfr committed Dec 3, 2018
1 parent 6dd5236 commit c125aa2
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 0 deletions.
7 changes: 7 additions & 0 deletions holoviews/tests/core/data/base.py
Expand Up @@ -566,6 +566,13 @@ def test_dataset_aggregate_string_types(self):
kdims='Gender', vdims=['Weight'])
self.compare_dataset(ds.aggregate(['Gender'], np.mean), aggregated)

def test_dataset_aggregate_string_types_size(self):
ds = Dataset({'Gender':['M', 'M'], 'Weight':[20, 10], 'Name':['Peter', 'Matt']},
kdims='Gender', vdims=['Weight', 'Name'])
aggregated = Dataset({'Gender': ['M'], 'Weight': [2], 'Name': [2]},
kdims='Gender', vdims=['Weight', 'Name'])
self.compare_dataset(ds.aggregate(['Gender'], np.size), aggregated)

def test_dataset_aggregate_ht_alias(self):
aggregated = Dataset({'gender':['M', 'F'], 'weight':[16.5, 10], 'height':[0.7, 0.8]},
kdims=self.alias_kdims[:1], vdims=self.alias_vdims)
Expand Down
3 changes: 3 additions & 0 deletions holoviews/tests/core/data/testdaskinterface.py
Expand Up @@ -54,6 +54,9 @@ def test_dataset_sort_string_ht(self):
def test_dataset_boolean_index(self):
raise SkipTest("Not supported")

def test_dataset_aggregate_string_types_size(self):
raise SkipTest("Not supported")

def test_dataset_from_multi_index(self):
df = pd.DataFrame({'x': np.arange(10), 'y': np.arange(10), 'z': np.random.rand(10)})
ddf = dd.from_pandas(df, 1)
Expand Down

0 comments on commit c125aa2

Please sign in to comment.