6
5

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?

More than 5 years have passed since last update.

RのデータフレームをPythonのpandasデータフレームにする方法

Last updated at Posted at 2018-04-14

RのダータフレームをPythonで使いたい

備忘録
RのデータフレームをPythonのpandasのデータフレームにする方法
rpy2を使う場合

python 3.6.4
pandas 0.22.0
rpy2 2.9.1

qiita.rb
import pandas as pd
from rpy2.robjects import pandas2ri
pandas2ri.activate()
from rpy2.robjects import r

# RDataを読込む
r['load']("hoge.RData")
# RDataの中にあるオブジェクトを読込む
df = pd.DataFrame(r["hogehoge"]) 

6
5
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
6
5

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?