-
Notifications
You must be signed in to change notification settings - Fork 110
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
SNOW-1722639: Add support for DataFrame.style
- Loading branch information
1 parent
0409865
commit c0779ca
Showing
6 changed files
with
45 additions
and
6 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,24 @@ | ||
# | ||
# Copyright (c) 2012-2024 Snowflake Computing Inc. All rights reserved. | ||
# | ||
|
||
import modin.pandas as pd | ||
import pandas as npd | ||
|
||
from tests.integ.utils.sql_counter import sql_count_checker | ||
|
||
species = ["adelie"] * 3 + ["chinstrap"] * 3 + ["gentoo"] * 3 | ||
measurements = ["bill_length", "flipper_length", "bill_depth"] * 3 | ||
values = [37.3, 187.1, 17.7, 46.6, 191.7, 17.6, 45.5, 212.7, 14.2] | ||
|
||
|
||
@sql_count_checker(query_count=1, join_count=0) | ||
def test_simple_style_accessor(): | ||
ndf = npd.DataFrame( | ||
{"species": species, "measurement": measurements, "value": values} | ||
) | ||
df = pd.DataFrame( | ||
{"species": species, "measurement": measurements, "value": values} | ||
) | ||
|
||
assert df.style.to_string() == ndf.style.to_string() |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters