本文整理汇总了Python中pandas.get_option方法的典型用法代码示例。如果您正苦于以下问题:Python pandas.get_option方法的具体用法?Python pandas.get_option怎么用?Python pandas.get_option使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在模块pandas的用法示例。
在下文中一共展示了pandas.get_option方法的22个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的Python代码示例。
示例1: _repr_html_
点赞 6
# 需要导入模块: import pandas [as 别名]
# 或者: from pandas import get_option [as 别名]
def _repr_html_(self):
if len(self._executed_sessions) == 0:
# not executed before, fall back to normal repr
raise NotImplementedError
corner_data = fetch_corner_data(
self, session=self._executed_sessions[-1])
buf = StringIO()
max_rows = pd.get_option('display.max_rows')
if self.shape[0] <= max_rows:
buf.write(corner_data._repr_html_())
else:
with pd.option_context('display.show_dimensions', False,
'display.max_rows', corner_data.shape[0] - 1):
buf.write(corner_data._repr_html_().rstrip().rstrip('