File tree 1 file changed +3
-7
lines changed
packages/python/plotly/plotly/express
1 file changed +3
-7
lines changed Original file line number Diff line number Diff line change @@ -1431,18 +1431,14 @@ def build_dataframe(args, constructor):
1431
1431
# def __dataframe__(self, ...):
1432
1432
# if not some_condition:
1433
1433
# self.to_pandas(...)
1434
- if not (
1435
- hasattr (df_not_pandas , "to_pandas" )
1436
- or hasattr (df_not_pandas , "toPandas" )
1437
- or hasattr (df_not_pandas , "to_pandas_df" )
1438
- ):
1439
- raise exc
1440
1434
if hasattr (df_not_pandas , "toPandas" ):
1441
1435
args ["data_frame" ] = df_not_pandas .toPandas ()
1442
1436
elif hasattr (df_not_pandas , "to_pandas_df" ):
1443
1437
args ["data_frame" ] = df_not_pandas .to_pandas_df ()
1444
- else :
1438
+ elif hasattr ( df_not_pandas , "to_pandas" ) :
1445
1439
args ["data_frame" ] = df_not_pandas .to_pandas ()
1440
+ else :
1441
+ raise exc
1446
1442
1447
1443
df_input = args ["data_frame" ]
1448
1444
You can’t perform that action at this time.
0 commit comments