File tree Expand file tree Collapse file tree 1 file changed +6
-0
lines changed
packages/python/plotly/plotly/express Expand file tree Collapse file tree 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):
13341334 elif hasattr (args ["data_frame" ], "toPandas" ):
13351335 args ["data_frame" ] = args ["data_frame" ].toPandas ()
13361336 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
13371340 else :
13381341 args ["data_frame" ] = pd .DataFrame (args ["data_frame" ])
13391342 columns = args ["data_frame" ].columns
@@ -1431,10 +1434,13 @@ def build_dataframe(args, constructor):
14311434 if not (
14321435 hasattr (df_not_pandas , "to_pandas" )
14331436 or hasattr (df_not_pandas , "toPandas" )
1437+ or hasattr (df_not_pandas , "to_pandas_df" )
14341438 ):
14351439 raise exc
14361440 if hasattr (df_not_pandas , "toPandas" ):
14371441 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 ()
14381444 else :
14391445 args ["data_frame" ] = df_not_pandas .to_pandas ()
14401446
You can’t perform that action at this time.
0 commit comments