pdeffebach / ClipData.jl

Move data to and from the clipboard in Julia
https://pdeffebach.github.io/ClipData.jl/stable/
MIT License
82 stars 6 forks source link

ClipData.jl

Copy/paste to/from Excel, Google Sheets, and other tabular data sources into interactive Julia sessions.

Interactive Julia sessions include the REPL, Pluto notebooks, Jupyter notebooks, and more!

ClipData uses CSV.jl under the hood for fast and flexible parsing of tabular data on the clipboard.

cliptable for data with headers

https://user-images.githubusercontent.com/711879/116339390-f44a9080-a7a2-11eb-9e3b-9d4716747bd1.mp4

cliparray for matrix or vector data

https://user-images.githubusercontent.com/711879/116340294-8c954500-a7a4-11eb-9159-cc9dc3fda80a.mp4

Keyword arguments

Keyword arguments passed to cliptable or cliparray will be passed to CSV.jl, so you can customize the behavior of the data "pasted" to Julia. See the CSV.jl docs for more info.

Example

This will remove whitespace and standardize headers for tabular data:

cliptable(;normalizenames=true)

mwetable and mwearray for Minimum Working Examples

ClipData also generates code to make it easy to copy and paste data to a script. This is ideal for slowly transitioning a complicated Excel workbook to a more reproducible Julia script.

You can also create Minimum Working Examples with arrays through the function mwearray.