-
-
Notifications
You must be signed in to change notification settings - Fork 18.1k
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
API: default export for to_clipboard is now csv/tsv suitable for excel (GH3368) #5070
Conversation
We should have a setting |
|
@jreback |
I think we make \t the default, maybe make it a config option as well? |
@y-p I will update docs/announcemnt not sure an explicity excel kw is necessary |
|
@y-p I actually need to use a sep of ',' to paste as I copy from a linux X window to excel; prob not typical |
there is no easy way to actually form the object prior to writing to the clipboad; eg. we are using to_csv and not to_string. |
right. I thought it'd be best if |
API: default export for to_clipboard is now csv (GH3368)
What a bummer to be ignored like that. sadness. |
@y-p what do you mean? I never saw a comment when I posted a request for further comments... |
Isn't it clearly better to extend the existing functionality rather then replace it? I made |
this doesn't actually change much, except for replacing space separation with tabs sep, which appears to be more compatible with various systems. I believe you pointed out the issue, which tab sep fixes, or is this not the case? |
tabs allow you to paste into excel, yeah, but now you can't get an aligned textual table into the clipboard. |
and how would you propose for an API to handle both of these somewhat discordant cases? as IMHO I would think pasting to excel is much more important |
What's wrong with what I suggested above?: def to_clipboard(excel=False):
if not excel:
to_string() # -> clip, original behavior
else:
to_csv(sep='\t') # -> clip , new behavior Also, why decide which is more important when it's so easy to allow both while |
ok....that's reasonable....guess I misunderstood what you meant....would have have a problem with default |
I guess there's not much harm in changing the default,since it's easy |
+1 on excel=True as the default, if for no other reason that it'd be a |
lol! |
Thanks jeff, it's just right now. :) |
:) |
closes #3368