title: Rpy2: pandas dataframe can't fit in R
body: <p>I need to read a csv file with python (into a pandas dataframe), work in R and return to python. Then, to pass pandas dataframe to R dataframe I use rpy2, and work ok (code bellow).</p>
  
  <pre><code>from pandas import read_csv, DataFrame
  import pandas.rpy.common as com
  import rpy2.robjects as robjects
  
  r = robjects.r
  r.library("fitdistrplus")
  
  df = read_csv('./datos.csv')
  r_df = com.convert_to_r_dataframe(df)
  print(type(r_df))
  </code></pre>
  
  <p>And this output is:</p>
  
  <pre><code>&lt;class 'rpy2.robjects.vectors.FloatVector'&gt;
  </code></pre>
  
  <p>But then, I try to make a fit in R:</p>
  
  <pre><code>fit2 = r.fitdist(r_df, "weibull")
  </code></pre>
  
  <p>But I have this error:</p>
  
  <pre><code>RRuntimeError: Error in (function (data, distr, method = c("mle", "mme", "qme", "mge"),  : 
  data must be a numeric vector of length greater than 1
  </code></pre>
  
  <p>I have 2nd question in this:<br>
  1_ What I do wrong?<br>
  2_ This is the most efficient way to pass a python dataframe to R? Because, I see this import: <code>from rpy2.robjects.packages import importr</code></p>
  
  <p>This is the data that I read: <a href="https://mega.co.nz/#!P8MEDSzQ!iQyxt73a5pRvJNOxWeSEaFlsVS7_A1sZCAXkUFBLJa0" rel="nofollow noreferrer">https://mega.co.nz/#!P8MEDSzQ!iQyxt73a5pRvJNOxWeSEaFlsVS7_A1sZCAXkUFBLJa0</a>    </p>
  
  <p>I use Ipython 2.1 Thanks! </p>