@@ -186,6 +186,9 @@ py_to_r.pandas.core.series.Series <- function(x) {
186186 values
187187}
188188
189+ # ' @export
190+ py_to_r.pandas.Series <- py_to_r.pandas.core.series.Series
191+
189192# ' @export
190193py_to_r.pandas.core.categorical.Categorical <- function (x ) {
191194 local_conversion_scope(x , FALSE )
@@ -199,6 +202,11 @@ py_to_r.pandas.core.categorical.Categorical <- function(x) {
199202py_to_r.pandas.core.arrays.categorical.Categorical <-
200203 py_to_r.pandas.core.categorical.Categorical
201204
205+ # ' @export
206+ py_to_r.pandas.arrays.NumpyExtensionArray <- function (x ) {
207+ py_to_r(x $ to_numpy())
208+ }
209+
202210# ' @export
203211py_to_r.pandas._libs.missing.NAType <- function (x ) {
204212 NA
@@ -221,6 +229,9 @@ summary.pandas.core.series.Series <- function(object, ...) {
221229 object $ describe()
222230}
223231
232+ # ' @export
233+ summary.pandas.Series <- summary.pandas.core.series.Series
234+
224235# ' @export
225236length.pandas.core.series.Series <- function (x ) {
226237 if (py_is_null_xptr(x ) || ! py_available())
@@ -230,11 +241,17 @@ length.pandas.core.series.Series <- function(x) {
230241 }
231242}
232243
244+ # ' @export
245+ length.pandas.Series <- length.pandas.core.series.Series
246+
233247# ' @export
234248dim.pandas.core.series.Series <- function (x ) {
235249 NULL
236250}
237251
252+ # ' @export
253+ dim.pandas.Series <- dim.pandas.core.series.Series
254+
238255# ' @export
239256r_to_py.data.frame <- function (x , convert = FALSE ) {
240257
@@ -313,10 +330,14 @@ py_to_r.pandas.core.frame.DataFrame <- function(x) {
313330 attr(df , " pandas.index" ) <- index
314331
315332 if (inherits(index , c(" pandas.core.indexes.base.Index" ,
316- " pandas.indexes.base.Index" ))) {
333+ " pandas.indexes.base.Index" ,
334+ " pandas.Index"
335+ ))) {
317336
318337 if (inherits(index , c(" pandas.core.indexes.range.RangeIndex" ,
319- " pandas.indexes.range.RangeIndex" )) &&
338+ " pandas.indexes.range.RangeIndex" ,
339+ " pandas.RangeIndex"
340+ )) &&
320341 np $ issubdtype(index $ dtype , np $ number ))
321342 {
322343 # check for a range index from 0 -> n. in such a case, we don't need
@@ -347,7 +368,9 @@ py_to_r.pandas.core.frame.DataFrame <- function(x) {
347368 }
348369
349370 else if (inherits(index , c(" pandas.core.indexes.datetimes.DatetimeIndex" ,
350- " pandas.tseries.index.DatetimeIndex" ))) {
371+ " pandas.tseries.index.DatetimeIndex" ,
372+ " pandas.DatetimeIndex"
373+ ))) {
351374
352375 converted <- tryCatch(py_to_r(index $ values ), error = identity )
353376
@@ -380,9 +403,15 @@ py_to_r.pandas.core.frame.DataFrame <- function(x) {
380403
381404}
382405
406+ # ' @export
407+ py_to_r.pandas.DataFrame <- py_to_r.pandas.core.frame.DataFrame
408+
383409# ' @export
384410summary.pandas.core.frame.DataFrame <- summary.pandas.core.series.Series
385411
412+ # ' @export
413+ summary.pandas.DataFrame <- summary.pandas.core.frame.DataFrame
414+
386415# ' @export
387416length.pandas.core.frame.DataFrame <- function (x ) {
388417 if (py_is_null_xptr(x ) || ! py_available())
@@ -392,6 +421,9 @@ length.pandas.core.frame.DataFrame <- function(x) {
392421 }
393422}
394423
424+ # ' @export
425+ length.pandas.DataFrame <- length.pandas.core.frame.DataFrame
426+
395427# ' @export
396428dim.pandas.core.frame.DataFrame <- function (x ) {
397429 if (py_is_null_xptr(x ) || ! py_available())
@@ -400,6 +432,10 @@ dim.pandas.core.frame.DataFrame <- function(x) {
400432 py_object_shape(x )
401433}
402434
435+ # ' @export
436+ dim.pandas.DataFrame <- dim.pandas.core.frame.DataFrame
437+
438+
403439# Scipy sparse matrices
404440# ' @importFrom Matrix Matrix
405441
0 commit comments