def test_info_repr(self):
max_rows = get_option('display.max_rows')
max_cols = get_option('display.max_columns')
# Long
h, w = max_rows + 1, max_cols - 1
df = DataFrame(dict((k, np.arange(1, 1 + h)) for k in np.arange(w)))
assert has_vertically_truncated_repr(df)
with option_context('display.large_repr', 'info'):
assert has_info_repr(df)
# Wide
h, w = max_rows - 1, max_cols + 1
df = DataFrame(dict((k, np.arange(1, 1 + h)) for k in np.arange(w)))
assert has_horizontally_truncated_repr(df)
with option_context('display.large_repr', 'info'):
assert has_info_repr(df)
test_format.py 文件源码
python
阅读 29
收藏 0
点赞 0
评论 0
评论列表
文章目录