0

Is there a function to convert pandas panel (3-dimensional) object to a rpy2.Array object?

I was able to do this to convert only the data to rpy2.Array. But this doesnt set the dimnames/names for the array object.

arrayobj = rpy2.robjects.numpy2ri.numpy2ri(panelobj.values)

Is there a clean way of converting the panel to rpy2.Array?

mipe34
  • 5,596
  • 3
  • 26
  • 38
  • 2
    Your post suggests that this use-case is not yet well covered. If you can cook up a simple self-contained example (one can just copy paste to trigger the problem), I believe that a fix can be proposed here fairly quickly, and that fix be pushed in the code base of rpy2 within a short additional time. – lgautier Apr 11 '13 at 18:59
  • FYI, you can change a panel to a frame, ``panel.to_frame()`` which creates a multi-index frame that I believe you can then directly export (to a data.frame) – Jeff Apr 12 '13 at 14:55

0 Answers0