File tree 1 file changed +6
-0
lines changed
packages/python/plotly/plotly/express
1 file changed +6
-0
lines changed Original file line number Diff line number Diff line change @@ -1334,6 +1334,9 @@ def build_dataframe(args, constructor):
1334
1334
elif hasattr (args ["data_frame" ], "toPandas" ):
1335
1335
args ["data_frame" ] = args ["data_frame" ].toPandas ()
1336
1336
columns = args ["data_frame" ].columns
1337
+ elif hasattr (args ["data_frame" ], "to_pandas_df" ):
1338
+ args ["data_frame" ] = args ["data_frame" ].to_pandas_df ()
1339
+ columns = args ["data_frame" ].columns
1337
1340
else :
1338
1341
args ["data_frame" ] = pd .DataFrame (args ["data_frame" ])
1339
1342
columns = args ["data_frame" ].columns
@@ -1431,10 +1434,13 @@ def build_dataframe(args, constructor):
1431
1434
if not (
1432
1435
hasattr (df_not_pandas , "to_pandas" )
1433
1436
or hasattr (df_not_pandas , "toPandas" )
1437
+ or hasattr (df_not_pandas , "to_pandas_df" )
1434
1438
):
1435
1439
raise exc
1436
1440
if hasattr (df_not_pandas , "toPandas" ):
1437
1441
args ["data_frame" ] = df_not_pandas .toPandas ()
1442
+ elif hasattr (df_not_pandas , "to_pandas_df" ):
1443
+ args ["data_frame" ] = df_not_pandas .to_pandas_df ()
1438
1444
else :
1439
1445
args ["data_frame" ] = df_not_pandas .to_pandas ()
1440
1446
You can’t perform that action at this time.
0 commit comments