Skip to content

Commit 804aa4a

Browse files
michevancopybara-github
authored andcommitted
Replace deprecated pandas.Styler.set_precision calls for Pandas 2.0.
PiperOrigin-RevId: 588175220 Change-Id: I43d15b934b91183e7713848ed11fcc707811c768
1 parent 1be8b1f commit 804aa4a

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

examples/end_to_end_demo_with_multiple_geos.ipynb

+4-4
Original file line numberDiff line numberDiff line change
@@ -530,7 +530,7 @@
530530
"\n",
531531
"for i, corr_matrix in enumerate(correlations):\n",
532532
" display(f\"geo {i}\")\n",
533-
" display(corr_matrix.style.background_gradient(cmap='RdBu', vmin=-1, vmax=1).set_precision(3))\n",
533+
" display(corr_matrix.style.background_gradient(cmap='RdBu', vmin=-1, vmax=1).format(precision=3))\n",
534534
" display(\"--------------------------------------------------------------------\")"
535535
]
536536
},
@@ -619,7 +619,7 @@
619619
" style = f'font-weight: {weight}; color: {color}'\n",
620620
" return style\n",
621621
"\n",
622-
"variances.style.set_precision(4).applymap(highlight_variances)\n"
622+
"variances.style.format(precision=4).applymap(highlight_variances)\n"
623623
]
624624
},
625625
{
@@ -697,7 +697,7 @@
697697
" style = f'font-weight: {weight}; color: {color}'\n",
698698
" return style\n",
699699
"\n",
700-
"spend_fractions.style.set_precision(4).applymap(highlight_low_spend_fractions)\n"
700+
"spend_fractions.style.format(precision=4).applymap(highlight_low_spend_fractions)\n"
701701
]
702702
},
703703
{
@@ -783,7 +783,7 @@
783783
" style = f'font-weight: {weight}; color: {color}'\n",
784784
" return style\n",
785785
"\n",
786-
"variance_inflation_factors.style.set_precision(4).applymap(highlight_high_vif_values)\n"
786+
"variance_inflation_factors.style.format(precision=4).applymap(highlight_high_vif_values)\n"
787787
]
788788
},
789789
{

0 commit comments

Comments
 (0)