Skip to content

Commit 9978e3e

Browse files
committed
fix check for to_pandas and toPandas
1 parent 62d864b commit 9978e3e

File tree

1 file changed

+3
-2
lines changed
  • packages/python/plotly/plotly/express

1 file changed

+3
-2
lines changed

packages/python/plotly/plotly/express/_core.py

+3-2
Original file line numberDiff line numberDiff line change
@@ -1428,8 +1428,9 @@ def build_dataframe(args, constructor):
14281428
# def __dataframe__(self, ...):
14291429
# if not some_condition:
14301430
# self.to_pandas(...)
1431-
if not hasattr(df_not_pandas, "to_pandas") or hasattr(
1432-
df_not_pandas, "toPandas"
1431+
if not (
1432+
hasattr(df_not_pandas, "to_pandas")
1433+
or hasattr(df_not_pandas, "toPandas")
14331434
):
14341435
raise exc
14351436
if hasattr(df_not_pandas, "toPandas"):

0 commit comments

Comments
 (0)