1
# Copyright (c) Streamlit Inc. (2018-2022) Snowflake Inc. (2022-2024)
3
# Licensed under the Apache License, Version 2.0 (the "License");
4
# you may not use this file except in compliance with the License.
5
# You may obtain a copy of the License at
7
# http://www.apache.org/licenses/LICENSE-2.0
9
# Unless required by applicable law or agreed to in writing, software
10
# distributed under the License is distributed on an "AS IS" BASIS,
11
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12
# See the License for the specific language governing permissions and
13
# limitations under the License.
20
df = pd.DataFrame([["foo", 100], ["bar", 200]])
21
styler = df.style.set_caption("The caption")
26
[["foo", 100], ["bar", 200]],
27
index=pd.CategoricalIndex([1, 2]),
33
[["foo", 100], ["bar", 200]],
34
index=pd.interval_range(start=0, end=2),
40
[["foo", 100], ["bar", 200]],
41
index=[["a", "b"], [1, 2]],
43
styler = df.style.highlight_max()
46
"## MultiIndex `add_rows()`"
48
[["foo", 100], ["bar", 200]],
49
index=[["a", "b"], [1, 2]],
52
[["baz", 300], ["qux", 400]],
53
index=[["c", "d"], [3, 4]],
60
[["foo", 100], ["bar", 200]], index=pd.RangeIndex(start=10, stop=30, step=10)
65
df = pd.DataFrame([[pd.NaT, 100], [pd.NaT, 200]])