It breaks because df.to_pandas() requires both Pandas and pyarrow to be installed (this is documented).
We should either not advertise support for those dataframes (they shouldn't appear in the variable list) in that case, or find a way around this.
Using :
will probably be the way to go to avoid using to_pandas.