Closed BryanCutler closed 3 years ago
also checked the print out is correct:
In [3]: df = pd.DataFrame({
...: "a": ["foo", "bar"],
...: "b": tp.TensorArray(np.array([[1, 2], [3, 4]]))
...: })
...: result = df.groupby("a").aggregate({"b": "sum"})
...: print(repr(result["b"].array))
...:
array([[3, 4],
[1, 2]])
will go ahead and merge since tests are green, cc @frreiss
TensorArray
aggregations were producing a ndarray ofTensorArray
s for each group. This changes aggs to produce aTensorElement
as a scalar, then allow construction of a newTensorArray
using an ndarray of the resultingTensorElement
objects.Fixes #124