-
Notifications
You must be signed in to change notification settings - Fork 134
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
WiP: Fancy print #361
base: master
Are you sure you want to change the base?
WiP: Fancy print #361
Conversation
in general i wholeheartedly support this feature! Could you include example in the pr description of how it would look like? |
of course I immediately found a bug and it doesn't work for datasets with attributesCollection :) |
# Check if ds stays intact | ||
table = ds.to_table(n_digits=1) | ||
assert_array_equal(ds.samples, old_ds.samples) | ||
|
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.
would be nice also to add a smoke test which would sweep through all test datasets and see if code doesn't blow. smth like
@sweepargs(ds=datasets.itervalues())
def test_to_table_test_datasets(ds):
dstxt = ds.to_table()
for a in itertools.chain(ds.sa.keys(), ds.fa.keys(), ds.a.keys()):
assert(a in dstxt)
@dinga92 interested to bring this baby to the finish line? ;) |
@dinga92 Ping! Let's get this done -- would be most appreciated! |
Nice printing of dataset objects, so that samples and sa are in rows and features/fa are in columns. Just disclosing it here for a feedback, not intended for merge at the moment. For now it is using external library "tabulate" (pipable, MIT licence).
example:
ds = normal_feature_dataset(nonbogus_features=[0,1])
ds.prt()
ds.prt(sa='targets', height=10)