OpenRefine and the power of Jython / Python

1,436 views
Skip to first unread message

Thad Guidry

unread,
Feb 28, 2017, 3:48:49 PM2/28/17
to openrefine
Hello Refiners !

Today I spent some time creating 2 brand new tutorials on how to use the power of Python within OpenRefine ( and even extend with PIP easily ! )


Enjoy and happy polishing,
-Thad

Ettore Rizza

unread,
Mar 1, 2017, 1:54:15 PM3/1/17
to OpenRefine
Thank you Thad. The integration of Jython / Python is, I think, a very powerful feature of Open Refine, but not very well documented.

 
Dare I say it? I used it for months thinking that Jython could not access any column other than the current one, before discovering (in one little line of the doc) that it was enough to use the syntax :
 
cells ['other column']['value']

 :/

Khanh Dinh Ngoc

unread,
Apr 8, 2017, 3:42:26 AM4/8/17
to OpenRefine
Many many thanks Thad! I use python heavily in my data pipelines and sometimes the pd.read_csv wouldn't work so well if the schema is corrupted along the rows. OpenRefine API would definitely complement it.

Ettore Rizza

unread,
Apr 8, 2017, 8:20:48 AM4/8/17
to OpenRefine
Yep, many thanks, Thad. I've finally bothered to try, the trick works perfectly. :)



Just a little tip for those who read this thread: if you already have a Python version installed, pip install <package> will install the package in your first Python distribution, not in Jython. To work around the problem, use this command instead: 

jython -m pip install <package>

Another point to report for those who know Python but not Jython: the packages compiled in C will not be installed. So no way to install pandas, LXML and many other modules often used (because they are very fast). As soon as I have two minutes, I will try to compile a list of useful Jython/Python modules for Open Refine.

Le mardi 28 février 2017 21:48:49 UTC+1, Thad Guidry a écrit :

Thad Guidry

unread,
Apr 8, 2017, 1:06:09 PM4/8/17
to OpenRefine

Ettore,

Add that info to the wiki tutorial! That's good info!


--
You received this message because you are subscribed to the Google Groups "OpenRefine" group.
To unsubscribe from this group and stop receiving emails from it, send an email to openrefine+...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Julien Vallières

unread,
Feb 5, 2021, 4:35:18 PM2/5/21
to OpenRefine
Hi Ettore,
Did you had time to compile that list of useful Jython/Python modules for Open Refine you mentioned here? I, for one, am looking for something similar today!
Julien
Reply all
Reply to author
Forward
0 new messages