Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fixed Diff primitive for rare nan case #21

Merged
merged 2 commits into from Oct 25, 2017
Merged

Fixed Diff primitive for rare nan case #21

merged 2 commits into from Oct 25, 2017

Conversation

bschreck
Copy link
Contributor

I ran into a bug with the Diff primitive that occurs when for a single variable and cutoff time, all values of both the variable and the feature to group by are nan. The bug occurs because Pandas drops the column names of empty dataframes, so we get a KeyError. This fix required a new variable in the mock entityset because we needed both an Id variable to group on that had a nan value and a numeric variable that had a nan.

@codecov-io
Copy link

Codecov Report

Merging #21 into master will increase coverage by 0.01%.
The diff coverage is 100%.

Impacted file tree graph

@@            Coverage Diff             @@
##           master      #21      +/-   ##
==========================================
+ Coverage   86.83%   86.85%   +0.01%     
==========================================
  Files          73       73              
  Lines        6768     6777       +9     
==========================================
+ Hits         5877     5886       +9     
  Misses        891      891
Impacted Files Coverage Δ
featuretools/tests/testing_utils/mock_ds.py 94.54% <100%> (ø) ⬆️
.../feature_function_tests/test_transform_features.py 85.3% <100%> (+0.15%) ⬆️
featuretools/primitives/transform_primitive.py 96.83% <100%> (+0.04%) ⬆️

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update fb87937...71e1571. Read the comment docs.

@kmax12 kmax12 requested a review from rwedge October 24, 2017 22:02
@kmax12
Copy link
Contributor

kmax12 commented Oct 25, 2017

Looks good to me

@kmax12 kmax12 merged commit 13c5762 into master Oct 25, 2017
@kmax12 kmax12 deleted the diff-empty-df-fix branch December 20, 2017 16:31
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants