Skip to content

Commit

Permalink
Select columns from dataframe using a list (alteryx#615)
Browse files Browse the repository at this point in the history
* Select columns from dataframe using a list

Previously the columns were in a set, but this doesn not work on pandas
0.23.

* Update changelog

* Update changelog
  • Loading branch information
CJStadler authored and jan committed Jul 7, 2019
1 parent 57d7cf7 commit d2d2274
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 4 deletions.
4 changes: 3 additions & 1 deletion docs/source/changelog.rst
Original file line number Diff line number Diff line change
Expand Up @@ -5,12 +5,14 @@ Changelog
**Future Release**
* Enhancements
* Fixes
* Change type of features calculated on Index features to Categorical (:pr:`602`)
* Select columns of dataframe using a list (:pr:`615`)
* Change type of features calculated on Index features to Categorical (:pr:`602`)
* Changes
* Documentation Changes
* Testing Changes

Thanks to the following people for contributing to this release:
:user:`CJStadler`

**v0.9.0** June 19, 2019
* Enhancements
Expand Down
6 changes: 3 additions & 3 deletions featuretools/computational_backends/feature_set_calculator.py
Original file line number Diff line number Diff line change
Expand Up @@ -617,11 +617,11 @@ def _necessary_columns(self, entity, feature_names):
if isinstance(v, (variable_types.Index,
variable_types.Id,
variable_types.TimeIndex))}
features = [self.feature_set.features_by_name[name]
for name in feature_names]
features = (self.feature_set.features_by_name[name]
for name in feature_names)
feature_columns = {f.variable.id for f in features
if isinstance(f, IdentityFeature)}
return index_columns | feature_columns
return list(index_columns | feature_columns)


def _can_agg(feature):
Expand Down

0 comments on commit d2d2274

Please sign in to comment.