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

[REF] abagen.io functions don't copy dataframes by default #94

Merged
merged 4 commits into from
Sep 5, 2019

Conversation

rmarkello
Copy link
Owner

By default if any of the abagen.io functions were passed a dataframe as input (instead of the expected filepath) it would return a copy of the dataframe. Unfortunately, this is often unwarranted -- there are few instances in abagen where a copy of the original dataframe is needed and the original can be used, instead.

This PR adds a copy parameter (False, by default) to all the abagen.io functions, and updates a few occasions when those functions are called and copying the input dataframe (if it is, indeed, a dataframe) is needed.

Such that if a pandas Dataframe is passed to these function it can
optionally (default) be copied and returned or (copy=False) simply
returned as-is.
@codecov
Copy link

codecov bot commented Sep 5, 2019

Codecov Report

Merging #94 into master will decrease coverage by 0.02%.
The diff coverage is 93.97%.

Impacted file tree graph

@@            Coverage Diff             @@
##           master      #94      +/-   ##
==========================================
- Coverage   91.05%   91.03%   -0.03%     
==========================================
  Files          31       31              
  Lines        1812     1830      +18     
==========================================
+ Hits         1650     1666      +16     
- Misses        162      164       +2
Impacted Files Coverage Δ
abagen/samples.py 100% <100%> (ø) ⬆️
abagen/allen.py 95% <100%> (ø) ⬆️
abagen/probes.py 97.08% <100%> (-0.03%) ⬇️
abagen/io.py 76.38% <91.83%> (+0.19%) ⬆️
abagen/tests/test_io.py 96.66% <95.83%> (+1.66%) ⬆️
abagen/datasets/__init__.py 100% <0%> (ø) ⬆️

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 372a6e0...4de6b6c. Read the comment docs.

@rmarkello rmarkello merged commit 0b4102b into master Sep 5, 2019
@rmarkello rmarkello deleted the iocopy branch September 5, 2019 15:34
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.

1 participant