ENH: to_clipboard(as="html" | "markdown" | "latex" | ...)
See original GitHub issueIs your feature request related to a problem?
When writing papers, it’s often useful to be able to copy dataframes into documents as Markdown, HTML or LaTeX.
Describe the solution you’d like
Allow more formats besides excel: bool
in DataFrame.to_clipboard()
. For example, a new keyword as
:
df.to_clipboard(as="html" | "markdown" | "latex" | ...)
API breaking implications
Pure extension unless excel
keyword of to_clipboard()
was removed in favor of as
.
Describe alternatives you’ve considered
The other option would be allowing the buf
argument of df.to_(html|markdown|latex|...)
to take the string "clipboard"
:
df.to_markdown(buf="clipboard")
Issue Analytics
- State:
- Created 2 years ago
- Reactions:1
- Comments:6 (6 by maintainers)
Top Results From Across the Web
Copy URL To Clipboard - Firefox Browser Add-ons - Mozilla
Copy document URL / link URL to clipboard as HTML, Markdown, BBCode, Textile, AsciiDoc, MediaWiki, Jira, reStructuredText, LaTeX, Text. You'll need Firefox to ......
Read more >Copy Webpage Content as HTML, Markdown, BBCode, Plain ...
Here is a free Chrome extension to copy webpage content as HTML, Markdown, BBCode formatting, plain text, etc. This extension is named as ......
Read more >How can I mix LaTeX in with Markdown? - Stack Overflow
But this term I'm teaching a class with a lot of math, and I'd love to be able to put LaTeX formulas with...
Read more >Spell Right - Visual Studio Marketplace
Spells plain text/markdown/LaTeX documents, comments/strings parts of ... (e.g. strings spelled in English and comments spelled in French).
Read more >Markdown syntax for wikis - Azure DevOps | Microsoft Learn
In this article, find some wiki-specific Markdown syntax guidance for ... Pasting rich content as HTML is supported in Azure DevOps Server ...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
clipboard_set
is used withinDataFrame.to_clipboard
.I would hazard that
to_clipboard
might have been coded before the other formats, html, laTex etc became available. It seems to be a simple extension to changeexcel={True, False}
to something likeformat={"excel", "str", "html", "latex"}
and to call the relevant renderer.It seems that
clipboard_set()
can be used.