pandas :没有。最大行数 [英] Pandas: Setting no. of max rows

查看:247
本文介绍了 pandas :没有。最大行数的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我在查看下面的 DataFrame = 100
foo = DataFrame(index = range(n))
foo ['float'] = np.random.randn(n)
foo

问题在于,它不会在ipython笔记本中按默认打印所有行,但是我必须切片以查看结果行。即使下面的选项也不会改变输出:

pre $ p $. $ p $ $
$

有谁知道如何显示整个数组?

解决方案

对于版本0.11.0,您需要更改 display.height display.max_rows
pre $ lt; code> pd.set_option('display.height',500)
pd.set_option('display .max_rows',500)

另见 pd.describe_option('display') 。 p>

I have a problem viewing the following DataFrame:

n = 100
foo = DataFrame(index=range(n))
foo['floats'] = np.random.randn(n)
foo

The problem is that it does not print all rows per default in ipython notebook, but I have to slice to view the resulting rows. Even the following option does not change the output:

pd.set_option('display.max_rows', 500)

Does anyone know how to display the whole array?

解决方案

For version 0.11.0 you need to change both display.height and display.max_rows.

pd.set_option('display.height', 500)
pd.set_option('display.max_rows', 500)

See also pd.describe_option('display').

这篇关于 pandas :没有。最大行数的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆