We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 9b03201 commit 2a409f1Copy full SHA for 2a409f1
packages/python/plotly/plotly/express/_core.py
@@ -1431,18 +1431,14 @@ def build_dataframe(args, constructor):
1431
# def __dataframe__(self, ...):
1432
# if not some_condition:
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
if hasattr(df_not_pandas, "toPandas"):
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()
1444
- else:
+ elif hasattr(df_not_pandas, "to_pandas"):
1445
args["data_frame"] = df_not_pandas.to_pandas()
+ else:
+ raise exc
1446
1447
df_input = args["data_frame"]
1448
0 commit comments