Skip to content

Commit 6a06e50

Browse files
author
MomIsBestFriend
committed
Fixed docs and typing for attr
1 parent a5905f3 commit 6a06e50

File tree

1 file changed

+8
-5
lines changed

1 file changed

+8
-5
lines changed

pandas/io/formats/style.py

Lines changed: 8 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -34,6 +34,7 @@
3434
import pandas as pd
3535
from pandas.api.types import is_dict_like, is_list_like
3636
import pandas.core.common as com
37+
from pandas.core.frame import DataFrame
3738
from pandas.core.generic import _shared_docs
3839
from pandas.core.indexing import _maybe_numeric_slice, _non_reducing_slice
3940

@@ -555,16 +556,18 @@ def render(self, **kwargs) -> str:
555556
d.update(kwargs)
556557
return self.template.render(**d)
557558

558-
def _update_ctx(self, attrs: FrameOrSeries) -> None:
559+
def _update_ctx(self, attrs: DataFrame) -> None:
559560
"""
560561
Update the state of the Styler.
561562
562563
Collects a mapping of {index_label: ['<property>: <value>']}.
563564
564-
attrs : Series or DataFrame
565-
should contain strings of '<property>: <value>;<prop2>: <val2>'
566-
Whitespace shouldn't matter and the final trailing ';' shouldn't
567-
matter.
565+
Parameters
566+
----------
567+
attrs : DataFrame
568+
should contain strings of '<property>: <value>;<prop2>: <val2>'
569+
Whitespace shouldn't matter and the final trailing ';' shouldn't
570+
matter.
568571
"""
569572
for row_label, v in attrs.iterrows():
570573
for col_label, col in v.items():

0 commit comments

Comments
 (0)