Mar 31, 2019

Tips for R to Python and Vice-Versa seamlessly

When we TATVA AI visit our clients, often both data scientists and higher management ask us, how we deal with both  Python and R simultaneously for client requests; as there is no universal preference among clients.


Though solution is not straight forward, however, I suggest to exploit common libraries for quick deployments, such as, dfply (python) and dplyr (R). Below is a quick example:


## R Code
library(dplyr)
testdata %>% filter(col.1==10)

## Python Code
from dfply import *
testdata >> filter_by(X.col.1==10)


Those who have not yet experience this can try out now and let me know your experiences at either info@tatvaai.com or mavuluri.pradeep@gmail.com

Happy R and Python Programming!

No comments: