##// END OF EJS Templates
Convert string columns in dataframes to R factors
Thomas Kluyver -
Show More
@@ -121,7 +121,7 b' def pyconverter(pyobj):'
121 from pandas import DataFrame
121 from pandas import DataFrame
122 if isinstance(pyobj, DataFrame):
122 if isinstance(pyobj, DataFrame):
123 from pandas.rpy.common import convert_to_r_dataframe
123 from pandas.rpy.common import convert_to_r_dataframe
124 return convert_to_r_dataframe(pyobj)
124 return convert_to_r_dataframe(pyobj, strings_as_factors=True)
125
125
126 return np.asarray(pyobj)
126 return np.asarray(pyobj)
127
127
General Comments 0
You need to be logged in to leave comments. Login now