Skip to content

Commit e48322a

Browse files
committed
Remove approach of checking environment which could not differentiate between jupyter console and notebook
1 parent d19d649 commit e48322a

File tree

1 file changed

+0
-11
lines changed

1 file changed

+0
-11
lines changed

python/datafusion/dataframe.py

Lines changed: 0 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -318,17 +318,6 @@ def __repr__(self) -> str:
318318
Returns:
319319
String representation of the DataFrame.
320320
"""
321-
# Check if we're in a Jupyter notebook. If so, we will only use
322-
# the _repr_html_ output to avoid calling collect() twice.
323-
try:
324-
from IPython import get_ipython
325-
326-
shell = get_ipython().__class__.__name__
327-
if shell == "ZMQInteractiveShell":
328-
return "" # Return empty string to effectively disable
329-
except (ImportError, NameError):
330-
pass
331-
332321
return self.df.__repr__()
333322

334323
def _repr_html_(self) -> str:

0 commit comments

Comments
 (0)