Python 熊猫:是否有最大尺寸,最大没有。列数,最大行数?

声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow 原文地址: http://stackoverflow.com/questions/15455722/
Warning: these are provided under cc-by-sa 4.0 license. You are free to use/share it, But you must attribute it to the original authors (not me): StackOverFlow

提示:将鼠标放在中文语句上可以显示对应的英文。显示中英文
时间:2020-08-18 20:10:52  来源:igfitidea点击:

pandas: Is there a max size, max no. of columns, max rows?

pythonpandas

提问by doanviettrung

.. and, if so, what are those max limits of pandas?

..而且,如果是这样,熊猫的最大限制是多少?

Sorry, this question seems elementary but I couldn't find an answer at pandas.pydata.org.

抱歉,这个问题看起来很初级,但我在 pandas.pydata.org 上找不到答案。

回答by root

No. Pandasuses numpy arrays under the hood, so I belive it's whatever you can fit in your memory. As far as numpy arrays are concerned, you can find some discussion here.

不。Pandas在引擎盖下使用 numpy 数组,所以我相信它是你能适应的任何东西。就 numpy 数组而言,您可以在这里找到一些讨论。

回答by Ludo Schmidt

The limit is your memory. ( but these limits are really large )

极限是你的记忆。(但这些限制真的很大)

But when you want to display a DataFrame table in "Jupyter Notebook", there is some predefined limits.

但是当您想在“Jupyter Notebook”中显示 DataFrame 表时,有一些预定义的限制。

For example you can:

例如,您可以:

print (pd.options.display.max_columns) # <--- this will display your limit
pd.options.display.max_columns = 500 # this will set limit of columns to 500

The same idea work with rows:

同样的想法适用于行:

display.max_rows

More details on: https://pandas.pydata.org/pandas-docs/stable/options.html

更多详情:https: //pandas.pydata.org/pandas-docs/stable/options.html