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

Fix Metadata Propagation with Overridden Pandas Methods #332

Merged
merged 7 commits into from
Apr 2, 2021

Conversation

westernguy2
Copy link
Contributor

Overview

Currently the Pandas methods that are being overridden (head, tail, describe) are changing the history for the original DataFrame, instead of the newly created one. This PR fixes that issue.

Changes

The PR moves changes the metadata of the DataFrame returned as a result of the Pandas operation. It also removes method that extends info since info doesn't return a DataFrame. The PR also ensures that the _pandas_only flag works in _ipython_display_ by re-adding the else clause that was commented out.

Example Output

The bug where two DataFrames would be outputted as a result of the lines:

df.info()
df

was what flagged this issue, and this is now fixed.

@codecov
Copy link

codecov bot commented Mar 30, 2021

Codecov Report

Merging #332 (1e33fbc) into master (2525d71) will increase coverage by 0.18%.
The diff coverage is 86.11%.

❗ Current head 1e33fbc differs from pull request most recent head 1cddd26. Consider uploading reports for the commit 1cddd26 to get more accurate results
Impacted file tree graph

@@            Coverage Diff             @@
##           master     #332      +/-   ##
==========================================
+ Coverage   79.90%   80.09%   +0.18%     
==========================================
  Files          50       50              
  Lines        3613     3612       -1     
==========================================
+ Hits         2887     2893       +6     
+ Misses        726      719       -7     
Impacted Files Coverage Δ
lux/core/frame.py 70.82% <86.11%> (+0.57%) ⬆️
lux/vislib/matplotlib/ScatterChart.py 76.47% <0.00%> (+1.17%) ⬆️
lux/vislib/matplotlib/Heatmap.py 98.33% <0.00%> (+1.66%) ⬆️
lux/vislib/altair/ScatterChart.py 96.96% <0.00%> (+3.03%) ⬆️
lux/vislib/altair/Heatmap.py 96.55% <0.00%> (+3.44%) ⬆️

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 2525d71...1cddd26. Read the comment docs.

@dorisjlee dorisjlee merged commit e96bf62 into lux-org:master Apr 2, 2021
@lux-org lux-org deleted a comment Apr 3, 2021
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.

2 participants