Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions doc/source/whatsnew/v0.20.2.txt
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,8 @@ Performance Improvements
Bug Fixes
~~~~~~~~~

- Silenced a warning on some Windows environments about "tput: terminal attributes: No such device or address" when
detecting the terminal size. This fix only applies to python 3 (:issue:`16496`)
- Bug in using ``pathlib.Path`` or ``py.path.local`` objects with io functions (:issue:`16291`)
- Bug in ``DataFrame.update()`` with ``overwrite=False`` and ``NaN values`` (:issue:`15593`)

Expand Down
6 changes: 6 additions & 0 deletions pandas/io/formats/terminal.py
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,8 @@
from __future__ import print_function

import os
import sys
import shutil

__all__ = ['get_terminal_size']

Expand All @@ -26,6 +28,10 @@ def get_terminal_size():
IPython zmq frontends, or IDLE do not run in a terminal,
"""
import platform

if sys.version_info[0] >= 3:
return shutil.get_terminal_size()

current_os = platform.system()
tuple_xy = None
if current_os == 'Windows':
Expand Down