Open bohm0072 opened 4 years ago
Thank you for taking the time to prepare a reproducible example like this -- it is greatly appreciated!
It looks like this is more generally an issue with conversion of these GeoDataFrames back to R:
> reticulate::py_to_r(gdf)
Warning in format.data.frame(if (omit) x[seq_len(n0), , drop = FALSE] else x, :
corrupt data frame: columns will be truncated or padded with NAs
col1 col2 geometry
1 1 3 <environment: 0x7f82cef057c0>
2 2 4 <NA>
In particular, it looks like we don't know how to convert the GeometryArray
object to an R object, and that gives us trouble.
> df$geometry
<GeometryArray>
[<shapely.geometry.point.Point>, <shapely.geometry.point.Point>]
Length: 2, dtype: geometry
System details
Steps to reproduce the problem
Describe the problem in detail
When using
View()
on a geopandas.GeoDataFrame object, the RStudio brower window returnsr error 4 (R code execution error)
while the Console returnsDescribe the behavior you expected
Expected behavior is to view geopandas.GeoDataFrame in similar manner to pandas.DataFrame object (as newly supported in RStudio 1.4) using View() function. Unsure if this is truly a bug or just a yet unsupported feature.