You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: doc/source/basics.rst
+17-14
Original file line number
Diff line number
Diff line change
@@ -1058,25 +1058,28 @@ and they are:
1058
1058
1059
1059
**Note:** developers can check out pandas/core/config.py for more info.
1060
1060
1061
-
Options have a full "dotted-style", case-insensitive name (e.g. ``print.max_rows``),
1061
+
Options have a full "dotted-style", case-insensitive name (e.g. ``display.max_rows``),
1062
1062
but all of the functions above accept a regexp pattern (``re.search`` style) as argument,
1063
1063
so passing in a substring will work - as long as it is unambiguous :
1064
1064
1065
1065
.. ipython:: python
1066
1066
1067
-
get_option("print.max_rows")
1068
-
set_option("print.max_rows",101)
1069
-
get_option("print.max_rows")
1067
+
get_option("display.max_rows")
1068
+
set_option("display.max_rows",101)
1069
+
get_option("display.max_rows")
1070
1070
set_option("max_r",102)
1071
-
get_option("print.max_rows")
1071
+
get_option("display.max_rows")
1072
1072
1073
1073
1074
-
However, the following will **not work** because it matches multiple option names, e.g.``print.max_colwidth``, ``print.max_rows``, ``print.max_columns``:
1074
+
However, the following will **not work** because it matches multiple option names, e.g.``display.max_colwidth``, ``display.max_rows``, ``display.max_columns``:
1075
1075
1076
1076
.. ipython:: python
1077
1077
:okexcept:
1078
1078
1079
-
get_option("print.max_")
1079
+
try:
1080
+
get_option("display.max_")
1081
+
exceptKeyErroras e:
1082
+
print(e)
1080
1083
1081
1084
1082
1085
**Note:** Using this form of convenient shorthand may make your code break if new options with similar names are added in future versions.
@@ -1103,23 +1106,23 @@ All options also have a default value, and you can use the ``reset_option`` to d
0 commit comments