CODAIT / text-extensions-for-pandas

Natural language processing support for Pandas dataframes.
Apache License 2.0
215 stars 34 forks source link

Minor: Add more aggregates for TensorArray #244

Closed frreiss closed 2 years ago

frreiss commented 2 years ago

This PR expands the set of aggregates that can be evaluated over a TensorArray via pandas.core.groupby.DataFrameGroupBy.aggregate. All the major array->scalar reductions built into NumPy are now supported. I've streamlined the structure of the _reduce() method to support the longer list of aggregates without a large set of if-then statements. I also added a test case to exercise all the branches of _reduce.

I'm also including some .gitignore fixes that I added to a commit by accident. Don't think they'll do any harm.