-
-
Notifications
You must be signed in to change notification settings - Fork 18.4k
ENH: print more detailed truncated sequence if a limit is given #3974
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
Conversation
@y-p can u take a look-see please |
AH HA! i figured out the case where the overlap happens now i can write a test :) thanks @y-p for pointing that out |
numpy's i don't think numpy's behavior in this regard is necessarily what a user would expect. personally, i would expect what do you think? this, of course, will not be consistent with numpy. right now the above described behavior is what i'm doing, but i can change if consistency with numpy is preferred. |
here's an example from the tests i've added: with cf.option_context('display.max_seq_items', 2, 'display.max_edge_items', 5):
s = 'Int64Index([0, ..., 9], dtype=int64)'
res = repr(tm.makeIntIndex(10))
assert_equal(s, res) |
I agree. when I suggested aligning with numpy I meant the format for summary: "foo foo foo ... foo foo foo", i.e. As simple as possible but no simpler. |
for the special case of repring a
|
Put constraints on the setting of of max_seq_items (even number >=2), and save yourself the special cases. |
that certainly simplifies my life a lot |
raise ValueError("value must be a positive integer") | ||
|
||
|
||
def is_pos_int_or_none(value): |
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.
note to self remove this
@y-p can u take a look when u get a chance? thanks |
@cpcloud close/push to 0.14? |
@cpcloud ? |
1 similar comment
@cpcloud ? |
pushing to 0.14 |
@y-p must have been accident |
It's stale, but it needs to happen for 0.14. If @cpcloud doesn't finish, I'll do it. |
@y-p gr8...i think i got all the accid closed ones...weird |
@cpcloud what's the state of this? |
I'll try to get this cleaned up this weekend. |
Something happened just now when I tried to update the remote .... getting the infinity commits again. |
Oh fudge I had those in a stash that has since been deleted .... ah well ... nothing major anyway. I'll open another PR. |
works similar to numpy except that the edgeitems is overriden by threshold rather than the other way around which is what np does.
closes #3391