File tree Expand file tree Collapse file tree 1 file changed +3
-7
lines changed
packages/python/plotly/plotly/express Expand file tree Collapse file tree 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):
14311431 # def __dataframe__(self, ...):
14321432 # if not some_condition:
14331433 # 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
14401434 if hasattr (df_not_pandas , "toPandas" ):
14411435 args ["data_frame" ] = df_not_pandas .toPandas ()
14421436 elif hasattr (df_not_pandas , "to_pandas_df" ):
14431437 args ["data_frame" ] = df_not_pandas .to_pandas_df ()
1444- else :
1438+ elif hasattr ( df_not_pandas , "to_pandas" ) :
14451439 args ["data_frame" ] = df_not_pandas .to_pandas ()
1440+ else :
1441+ raise exc
14461442
14471443 df_input = args ["data_frame" ]
14481444
You can’t perform that action at this time.
0 commit comments