Skip to content

Commit a4d33d5

Browse files
committed
update docs
1 parent 83e1e3e commit a4d33d5

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

doc/source/user_guide/style.ipynb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -109,7 +109,7 @@
109109
"cell_type": "markdown",
110110
"metadata": {},
111111
"source": [
112-
"The `row0_col2` is the identifier for that particular cell. We've also prepended each row/column identifier with a UUID unique to each DataFrame so that the style from one doesn't collide with the styling from another within the same notebook or page (you can set the `uuid` if you'd like to tie together the styling of two DataFrames).\n",
112+
"The `row0_col2` is the identifier for that particular cell. We've also prepended each row/column identifier with part of a universally unique identifier (UUID) having 16-bits of randomness to each DataFrame so that the style from one doesn't collide with the styling from another within the same notebook or page (you can set the `uuid` if you'd like to tie together the styling of two DataFrames, or if for any reason you need more randomness).\n",
113113
"\n",
114114
"When writing style functions, you take care of producing the CSS attribute / value pairs you want. Pandas matches those up with the CSS classes that identify each cell."
115115
]

pandas/io/formats/style.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -159,7 +159,7 @@ def __init__(
159159
self.index = data.index
160160
self.columns = data.columns
161161

162-
self.uuid = uuid or (uuid4().hex[:6] + "_")
162+
self.uuid = uuid or (uuid4().hex[:4] + "_")
163163
self.table_styles = table_styles
164164
self.caption = caption
165165
if precision is None:

0 commit comments

Comments
 (0)