pydata/pandas — pull request #7385 by sinhrks (2014-06-07 14:08:11+00:00)
Title: ENH: automatic rpy2 instance conversion

Derived from #7309. Create a wrapper for `robjects.r` in `pandas.rpy.common` to perform automatic pandas `DataFrame` and `Series` conversion. `Series` will be converted to R data.frame to preserve rownames (index).

If looks OK, I'll modify the doc (#7309) based on following API.

```
import pandas as pd
import pandas.rpy.common as com

iris = com.load_data('iris')
com.r.assign('iris', iris)
returned = com.r['iris']
type(returned)
#

df = pd.DataFrame(np.random.randn(20, 5),
index=pd.date_range(start='2011/01/01', freq='D', periods=20))
com.r.assign('df', df)
returned = com.r['df']
type(returned)
#

s = pd.Series(np.random.randn(20), name='test')
com.r.assign('s', s)
returned = com.r['s']
type(returned)
#
```