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/options.rst
+13-8
Original file line number
Diff line number
Diff line change
@@ -474,10 +474,10 @@ Unicode Formatting
474
474
Enabling this option will affect the performance for printing of DataFrame and Series (about 2 times slower).
475
475
Use only when it is actually required.
476
476
477
-
Some East Asian countries use Unicode characters its width is corresponding to 2 alphabets.
478
-
If DataFrame or Series contains these characters, default output cannot be aligned properly.
477
+
Some East Asian countries use Unicode characters whose width corresponds to two Latin characters.
478
+
If a DataFrame or Series contains these characters, the default output mode may not align them properly.
479
479
480
-
.. note:: Screen captures are attached for each outputs to show the actual results.
480
+
.. note:: Screen captures are attached for each output to show the actual results.
481
481
482
482
.. ipython:: python
483
483
@@ -486,8 +486,9 @@ If DataFrame or Series contains these characters, default output cannot be align
486
486
487
487
.. image:: _static/option_unicode01.png
488
488
489
-
Enable ``display.unicode.east_asian_width`` allows pandas to check each character's "East Asian Width" property.
490
-
These characters can be aligned properly by checking this property, but it takes longer time than standard ``len`` function.
489
+
Enabling ``display.unicode.east_asian_width`` allows pandas to check each character's "East Asian Width" property.
490
+
These characters can be aligned properly by setting this option to ``True``. However, this will result in longer render
491
+
times than the standard ``len`` function.
491
492
492
493
.. ipython:: python
493
494
@@ -496,9 +497,10 @@ These characters can be aligned properly by checking this property, but it takes
496
497
497
498
.. image:: _static/option_unicode02.png
498
499
499
-
In addition, Unicode contains characters which width is "Ambiguous". These character's width should be either 1 or 2 depending on terminal setting or encoding. Because this cannot be distinguished from Python, ``display.unicode.ambiguous_as_wide`` option is added to handle this.
500
+
In addition, Unicode characters whose width is "Ambiguous" can either be 1 or 2 characters wide depending on the
501
+
terminal setting or encoding. The option ``display.unicode.ambiguous_as_wide`` can be used to handle the ambiguity.
500
502
501
-
By default, "Ambiguous" character's width, "¡" (inverted exclamation) in below example, is regarded as 1.
503
+
By default, an "Ambiguous" character's width, such as "¡" (inverted exclamation) in the example below, is taken to be 1.
502
504
503
505
.. ipython:: python
504
506
@@ -507,7 +509,10 @@ By default, "Ambiguous" character's width, "¡" (inverted exclamation) in below
507
509
508
510
.. image:: _static/option_unicode03.png
509
511
510
-
Enabling ``display.unicode.ambiguous_as_wide`` lets pandas to figure these character's width as 2. Note that this option will be effective only when ``display.unicode.east_asian_width`` is enabled. Confirm starting position has been changed, but is not aligned properly because the setting is mismatched with this environment.
512
+
Enabling ``display.unicode.ambiguous_as_wide`` makes pandas interpret these characters' widths to be 2.
513
+
(Note that this option will only be effective when ``display.unicode.east_asian_width`` is enabled.)
514
+
515
+
However, setting this option incorrectly for your terminal will cause these characters to be aligned incorrectly:
0 commit comments