alteryx/featuretools

Update allowed types for instance_vals in query_by_values

Open

#1,272 建立於 2020年12月10日

在 GitHub 查看
 (3 留言) (0 反應) (0 負責人)Python (6,895 star) (853 fork)batch import
good first issuetech debt

描述

Currently the query_by_values method lists four allowable input types for the instance_vals parameter: pd.Dataframe, pd.Series, list[str] or str

The current Featuretools code will only call this method with a pd.Series input during normal operation, although there are several unit tests that call the method with a list used to specify instance_vals. There is code in the _vals_to_series method that handles the conversion of these different types. As there is no current need in Featuretools for this code to handle pd.DataFrame or str inputs, these types could be removed.

Optionally, support for list input could be dropped if the corresponding unit tests are updated, which would leave only pd.Series as a valid input type for instance_vals.

Making these changed would simplify the code base and test suite. Any users that might be calling query_by_values directly with one of the dropped types, would simply have to convert their values to a pd.Series before the call, but otherwise the functionality and output would remain unchanged.

貢獻者指南