Skip to content

Commit dc96e7a

Browse files
lbeltramewesm
authored andcommitted
Use NA_Real, or conversion to matrices will turn NAs into zeros
1 parent f76aa9b commit dc96e7a

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

pandas/rpy/common.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -207,7 +207,7 @@ def convert_to_r_dataframe(df, strings_as_factors=False):
207207
for column in df:
208208
value = df[column]
209209
value_type = value.dtype.type
210-
value = [item if pn.notnull(item) else robj.NA_Logical
210+
value = [item if pn.notnull(item) else robj.NA_Real
211211
for item in value]
212212
value = VECTOR_TYPES[value_type](value)
213213

0 commit comments

Comments
 (0)