-
Notifications
You must be signed in to change notification settings - Fork 16
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
Reading from csv files #364
Conversation
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## master #364 +/- ##
=========================================
Coverage 100.00% 100.00%
=========================================
Files 34 36 +2
Lines 2979 3043 +64
=========================================
+ Hits 2979 3043 +64 ☔ View full report in Codecov by Sentry. |
@yallup does this perform as expected? |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Just tested and the functionality seems good. Including read_csv into the read_chains logic chain may be useful and then plugs into the gui automatically to boot?
I agree this is a good idea, but leaves a small choice: If we want it to be consistent with Thoughts/preferences? |
(could always accept both) |
I was going to remark (before checking that it is actually consistent with pandas as is), that root as a filename arg would be preferable. Although we override pandas I think there is enough local precedent to make this conform to the "root" style chains file reading. |
OK, I've implemented both, so you can pass root or root.csv to |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Does everything I was looking for, am not testing any of the intricacies around labels but looks good to me(rge)
Description
Following conversations with @yallup, this PR implements reading csv files which have been written with the
.to_csv
method. Getting this right for all variations on labels/weights being dropped is a little fiddly, and the current implementation prioritises robustness over speed (reading multiple times in some cases), but will function as a low-latency start point.For consistency this also moves
WeightedLabelledPandas
into its own fileanesthetic.weighted_labelled_pandas.py
rather thananesthetic.samples
, which reduces clutter for users just looking at the latter file.Checklist:
flake8 anesthetic tests
)pydocstyle --convention=numpy anesthetic
)python -m pytest
)