设置jupyter中DataFrame的显示限制方式
作者:痴迷、淡然~ 时间:2022-09-17 17:28:57
jupyter中显示的DataFrame过长时会自动换行(print()显示方式)或自动省略(单元格最后一行直接显示),在一些情况下看上去不是很方便,可调节显示参数如下:
import pandas as pd
pd.set_option('display.width', 500) #设置整体宽度
pd.set_option('display.height', 500) #设置整体高度
pd.set_option('display.max_rows',100) #设置最大行数
pd.set_option('display.max_columns', 100) #设置最大列数
补充知识:pandas中关于DataFrame行,列显示不完全(省略)的解决办法
我就废话不多说了,看代码吧
#显示所有列
pd.set_option('display.max_columns', None)
#显示所有行
pd.set_option('display.max_rows', None)
#设置value的显示长度为100,默认为50
pd.set_option('max_colwidth',100)
来源:https://blog.csdn.net/qq_36512295/article/details/85603061
标签:jupyter,DataFrame,限制
![](/images/zang.png)
![](/images/jiucuo.png)
猜你喜欢
如何通过Python实现定时打卡小程序
2023-10-20 14:11:33
![](https://img.aspxhome.com/file/2023/9/82579_0s.png)
带你轻松接触 MySQL中损坏的MyISAM表
2008-12-19 17:55:00
Ajax+Servlet+jsp显示搜索效果
2023-06-14 08:29:34
![](https://img.aspxhome.com/file/2023/4/65744_0s.jpg)
Django集成百度富文本编辑器uEditor攻略
2021-01-11 21:43:21
最新Python APScheduler 定时任务详解
2021-05-03 21:58:53
![](https://img.aspxhome.com/file/2023/3/69503_0s.png)
IA学习笔记02:组织体系
2009-06-12 12:22:00
![](https://img.aspxhome.com/file/UploadPic/20096/12/e6b798e5ae9de7bd91-e6b798efbc81e68891e5969ce6aca2-e589afe69cac-95s.jpg)
PHP htmlspecialchars()函数用法与实例讲解
2023-06-02 16:48:38
![](https://img.aspxhome.com/file/2023/2/55382_0s.png)
学习JavaScript设计模式之装饰者模式
2023-07-19 08:59:07
关于php unset对json_encode的影响详解
2023-07-06 08:33:52
![](https://img.aspxhome.com/file/2023/6/55356_0s.png)
ADO组件之分页程序详解
2008-10-09 12:28:00
Python3 Tensorlfow:增加或者减小矩阵维度的实现
2023-08-25 21:55:40
![](https://img.aspxhome.com/file/2023/8/87828_0s.jpg)
JS实现标签滚动切换效果
2023-08-24 00:35:37
![](https://img.aspxhome.com/file/2023/8/56138_0s.jpg)
Window.Open详解
2008-06-08 13:43:00
Oracle密码文件的使用和维护第1/3页
2010-07-30 12:43:00
从绘画语言的发展,看视觉设计风格
2008-08-03 17:11:00
python logging日志打印过程解析
2023-11-03 13:04:09
![](https://img.aspxhome.com/file/2023/8/64308_0s.png)
JSP 开发之 releaseSession的实例详解
2023-06-14 11:49:03
网页设计经验谈
2007-10-30 13:11:00
Python安装使用命令行交互模块pexpect的基础教程
2023-07-09 22:43:40
MySQL数据库的root口令恢复方法总结
2009-08-19 09:03:00