Python之pandas:pandas.set_option函数的参数详细解释

Python之pandas:pandas.set_option函数的参数详细解释函数API:pandas.set_optionpandas.set_option函数的参数解释pandas.set_option(pat, value) = <pandas._config.config.CallableDynamicDoc object>Available options:compute.[use_bottleneck, use_numba, use_numexpr]display.[chop_threshold, colheader_justify, column_space, date_dayfirst, date_yearfirst, encoding, expand_frame_repr, float_format]display.html.[border, table_schema, use_mathjax]display.[large_repr]display.latex.[escape, longtable, multicolumn, multicolumn_format, multirow, repr]display.[max_categories, max_columns, max_colwidth, max_info_columns, max_info_rows, max_rows, max_seq_items, memory_usage, min_rows, multi_sparse, notebook_repr_html, pprint_nest_depth, precision, show_dimensions]display.unicode.[ambiguous_as_wide, east_asian_width]display.[width]io.excel.ods.[reader, writer]io.excel.xls.[reader, writer]io.excel.xlsb.[reader]io.excel.xlsm.[reader, writer]io.excel.xlsx.[reader, writer]io.hdf.[default_format, dropna_table]io.parquet.[engine]mode.[chained_assignment, sim_interactive, use_inf_as_na, use_inf_as_null]plotting.[backend]plotting.matplotlib.[register_converters]Parameters:pat:strRegexp which should match a single option. Note: partial matches are supported for convenience, but unless you use the full option name (e.g. x.y.z.option_name), your code may break in future versions if new options with similar names are introduced.value:object,New value of option.Returns: NoneRaises: OptionError if no such option existsNotesThe available options with its descriptions:compute.use_bottleneckboolUse the bottleneck library to accelerate if it is installed, the default is True Valid values: False,True [default: True] [currently: True]compute.use_numbaboolUse the numba engine option for select operations if it is installed, the default is False Valid values: False,True [default: False] [currently: False]compute.use_numexprboolUse the numexpr library to accelerate computation if it is installed, the default is True Valid values: False,True [default: True] [currently: True]display.chop_thresholdfloat or Noneif set to a float value, all float values smaller then the given threshold will be displayed as exactly 0 by repr and friends. [default: None] [currently: None]display.colheader_justify'left’/’right’Controls the justification of column headers. used by DataFrameFormatter. [default: right] [currently: right]display.column_space No description available.[default: 12] [currently: 12]display.date_dayfirstbooleanWhen True, prints and parses dates with the day first, eg 20/01/2005 [default: False] [currently: False]display.date_yearfirstbooleanWhen True, prints and parses dates with the year first, eg 2005/01/20 [default: False] [currently: False]display.encodingstr/unicodeDefaults to the detected encoding of the console. Specifies the encoding to be used for strings returned by to_string, these are generally strings meant to be displayed on the console. [default: utf-8] [currently: utf-8]display.expand_frame_reprbooleanWhether to print out the full DataFrame repr for wide DataFrames across multiple lines, max_columns is still respected, but the output will wrap-around across multiple “pages” if its width exceeds display.width. [default: True] [currently: True]display.float_formatcallableThe callable should accept a floating point number and return a string with the desired format of the number. This is used in some places like SeriesFormatter. See formats.format.EngFormatter for an example. [default: None] [currently: None]display.html.borderintA border=value attribute is inserted in the <table> tag for the DataFrame HTML repr. [default: 1] [currently: 1]display.html.table_schemabooleanWhether to publish a Table Schema representation for frontends that support it. (default: False) [default: False] [currently: False]display.html.use_mathjaxbooleanWhen True, Jupyter notebook will process table contents using MathJax, rendering mathematical expressions enclosed by the dollar symbol. (default: True) [default: True] [currently: True]display.large_repr'truncate’/’info’For DataFrames exceeding max_rows/max_cols, the repr (and HTML repr) can show a truncated table (the default from 0.13), or switch to the view from df.info() (the behaviour in earlier versions of pandas). [default: truncate] [currently: truncate]display.latex.escapeboolThis specifies if the to_latex method of a Dataframe uses escapes special characters. Valid values: False,True [default: True] [currently: True]display.latex.longtable :boolThis specifies if the to_latex method of a Dataframe uses the longtable format. Valid values: False,True [default: False] [currently: False]display.latex.multicolumnboolThis specifies if the to_latex method of a Dataframe uses multicolumns to pretty-print MultiIndex columns. Valid values: False,True [default: True] [currently: True]display.latex.multicolumn_formatboolThis specifies if the to_latex method of a Dataframe uses multicolumns to pretty-print MultiIndex columns. Valid values: False,True [default: l] [currently: l]display.latex.multirowboolThis specifies if the to_latex method of a Dataframe uses multirows to pretty-print MultiIndex rows. Valid values: False,True [default: False] [currently: False]display.latex.reprbooleanWhether to produce a latex DataFrame representation for jupyter environments that support it. (default: False) [default: False] [currently: False]display.max_categoriesintThis sets the maximum number of categories pandas should output when printing out a Categorical or a Series of dtype “category”. [default: 8] [currently: 8]display.max_columnsintIf max_cols is exceeded, switch to truncate view. Depending on large_repr, objects are either centrally truncated or printed as a summary view. 'None’ value means unlimited.In case python/IPython is running in a terminal and large_repr equals 'truncate’ this can be set to 0 and pandas will auto-detect the width of the terminal and print a truncated object which fits the screen width. The IPython notebook, IPython qtconsole, or IDLE do not run in a terminal and hence it is not possible to do correct auto-detection. [default: 0] [currently: 0]display.max_colwidthint or NoneThe maximum width in characters of a column in the repr of a pandas data structure. When the column overflows, a “…” placeholder is embedded in the output. A 'None’ value means unlimited. [default: 50] [currently: 50]display.max_info_columnsintmax_info_columns is used in DataFrame.info method to decide if per column information will be printed. [default: 100] [currently: 100]display.max_info_rowsint or Nonedf.info() will usually show null-counts for each column. For large frames this can be quite slow. max_info_rows and max_info_cols limit this null check only to frames with smaller dimensions than specified. [default: 1690785] [currently: 1690785]display.max_rowsintIf max_rows is exceeded, switch to truncate view. Depending on large_repr, objects are either centrally truncated or printed as a summary view. 'None’ value means unlimited.In case python/IPython is running in a terminal and large_repr equals 'truncate’ this can be set to 0 and pandas will auto-detect the height of the terminal and print a truncated object which fits the screen height. The IPython notebook, IPython qtconsole, or IDLE do not run in a terminal and hence it is not possible to do correct auto-detection. [default: 60] [currently: 15]display.max_seq_itemsint or Nonewhen pretty-printing a long sequence, no more then max_seq_items will be printed. If items are omitted, they will be denoted by the addition of “…” to the resulting string.If set to None, the number of items to be printed is unlimited. [default: 100] [currently: 100]display.memory_usagebool, string or NoneThis specifies if the memory usage of a DataFrame should be displayed when df.info() is called. Valid values True,False,’deep’ [default: True] [currently: True]display.min_rowsintThe numbers of rows to show in a truncated view (when max_rows is exceeded). Ignored when max_rows is set to None or 0. When set to None, follows the value of max_rows. [default: 10] [currently: 10]display.multi_sparseboolean“sparsify” MultiIndex display (don’t display repeated elements in outer levels within groups) [default: True] [currently: True]display.notebook_repr_htmlbooleanWhen True, IPython notebook will use html representation for pandas objects (if it is available). [default: True] [currently: True]display.pprint_nest_depthintControls the number of nested levels to process when pretty-printing [default: 3] [currently: 3]display.precisionintFloating point output precision (number of significant digits). This is only a suggestion [default: 6] [currently: 6]display.show_dimensionsboolean or 'truncate’Whether to print out dimensions at the end of DataFrame repr. If 'truncate’ is specified, only print out the dimensions if the frame is truncated (e.g. not display all rows and/or columns) [default: truncate] [currently: truncate]display.unicode.ambiguous_as_widebooleanWhether to use the Unicode East Asian Width to calculate the display text width. Enabling this may affect to the performance (default: False) [default: False] [currently: False]display.unicode.east_asian_widthbooleanWhether to use the Unicode East Asian Width to calculate the display text width. Enabling this may affect to the performance (default: False) [default: False] [currently: False]display.widthintWidth of the display in characters. In case python/IPython is running in a terminal this can be set to None and pandas will correctly auto-detect the width. Note that the IPython notebook, IPython qtconsole, or IDLE do not run in a terminal and hence it is not possible to correctly detect the width. [default: 80] [currently: 80]io.excel.ods.readerstringThe default Excel reader engine for 'ods’ files. Available options: auto, odf. [default: auto] [currently: auto]io.excel.ods.writerstringThe default Excel writer engine for 'ods’ files. Available options: auto, odf. [default: auto] [currently: auto]io.excel.xls.readerstringThe default Excel reader engine for 'xls’ files. Available options: auto, xlrd. [default: auto] [currently: auto]io.excel.xls.writerstringThe default Excel writer engine for 'xls’ files. Available options: auto, xlwt. [default: auto] [currently: auto]io.excel.xlsb.readerstringThe default Excel reader engine for 'xlsb’ files. Available options: auto, pyxlsb. [default: auto] [currently: auto]io.excel.xlsm.readerstringThe default Excel reader engine for 'xlsm’ files. Available options: auto, xlrd, openpyxl. [default: auto] [currently: auto]io.excel.xlsm.writerstringThe default Excel writer engine for 'xlsm’ files. Available options: auto, openpyxl. [default: auto] [currently: auto]io.excel.xlsx.readerstringThe default Excel reader engine for 'xlsx’ files. Available options: auto, xlrd, openpyxl. [default: auto] [currently: auto]io.excel.xlsx.writerstringThe default Excel writer engine for 'xlsx’ files. Available options: auto, openpyxl, xlsxwriter. [default: auto] [currently: auto]io.hdf.default_formatformatdefault format writing format, if None, then put will default to 'fixed’ and append will default to 'table’ [default: None] [currently: None]io.hdf.dropna_tablebooleandrop ALL nan rows when appending to a table [default: False] [currently: False]io.parquet.enginestringThe default parquet reader/writer engine. Available options: 'auto’, 'pyarrow’, 'fastparquet’, the default is 'auto’ [default: auto] [currently: auto]mode.chained_assignmentstringRaise an exception, warn, or no action if trying to use chained assignment, The default is warn [default: warn] [currently: warn]mode.sim_interactivebooleanWhether to simulate interactive mode for purposes of testing [default: False] [currently: False]mode.use_inf_as_nabooleanTrue means treat None, NaN, INF, -INF as NA (old way), False means None and NaN are null, but INF, -INF are not NA (new way). [default: False] [currently: False]mode.use_inf_as_nullbooleanuse_inf_as_null had been deprecated and will be removed in a future version. Use use_inf_as_na instead. [default: False] [currently: False] (Deprecated, use mode.use_inf_as_na instead.)plotting.backendstrThe plotting backend to use. The default value is “matplotlib”, the backend provided with pandas. Other backends can be specified by providing the name of the module that implements the backend. [default: matplotlib] [currently: matplotlib]plotting.matplotlib.register_convertersbool or 'auto’.Whether to register converters with matplotlib’s units registry for dates, times, datetimes, and Periods. Toggling to False will remove the converters, restoring any converters that pandas overwrote. [default: auto] [currently: auto]

(0)

相关推荐

  • Python 3.7中dataclass的终极指南(一)

    from dataclasses import dataclass from typing import List @dataclass class PlayingCard:     rank: st ...

  • currently

    例如"Some patterns will make you think of different ways to structure your organization from how ...

  • Python之Pandas:pandas.DataFrame.to_csv函数的简介、具体案例、使用方法详细攻略

    Python之Pandas:pandas.DataFrame.to_csv函数的简介.具体案例.使用方法详细攻略pandas.DataFrame.to_csv函数的简介DataFrame.to_csv ...

  • pandas DataFrame.shift()函数

    pandas DataFrame.shift()函数可以把数据移动指定的位数 period参数指定移动的步幅,可以为正为负.axis指定移动的轴,1为行,0为列. eg: 有这样一个DataFrame ...

  • Python数据分析库-Pandas的介绍与安装

    各位客官姥爷好,欢迎回来.我们之前的内容一直围绕着正则表达式展开,这次我们就讲点别的.既然我的公众号名称叫做转行学数据分析,那么我们今天就来讲讲数据分析有关的,一个常见的Python的数据分析库--P ...

  • Python数据分析库-Pandas在数据分析中的知识点(一)

    各位客官姥爷好,欢迎回来.上节我们简单介绍了Pandas名称的由来,以及后续的安装工作.相信大家都有跟着一起安装,既然装好了那就用起来吧,本节我们来看看Pandas在数据分析过程会涉及到哪些常用的知识 ...

  • 第13天:Python 函数的参数

    定义一个函数非常简单,但是怎么定义一个函数,需要什么参数,怎么去调用却是我们需要去思考的问题. 如同大多数语言一样(如 Java),Python 也提供了多种参数的设定(如:默认值参数.关键字参数.形 ...

  • Python数据分析库-Pandas在数据分析中的知识点(二)

    各位客官姥爷好,欢迎回来.上节我们总结了Pandas在数据分析应用过程的部分知识点,我们这节紧接着这些内容,再来看一些常见的用法. 01  向量运算 我们这边先新建一个Dataframe import ...

  • python:函数传参是否会改变函数外参数的值

    参考链接: https://blog.csdn.net/u012614287/article/details/57149290 https://blog.csdn.net/qq915697213/ar ...

  • python函数的参数类型总结

    定义函数 在Python中,定义一个函数要使用def语句,依次写出函数名.括号.括号中的参数和冒号,然后在缩进块中编写函数体,函数的返回值用return语句返回. def power(x, n=2): ...

  • Python函数的参数是如何工作的?

    https://m.toutiao.com/is/Jwaod7L/ 我们先探讨在Python中如何将参数传递给函数的相关细节,然后回顾与这些概念相关的良好软件工程实践的一般理论. 通过了解Python ...