Skip to content

Commit c8badb9

Browse files
authored
COMPAT: Change pandas use_inf_as_null to reflect 2.0 deprecation (#3177)
1 parent ba786bc commit c8badb9

File tree

3 files changed

+3
-3
lines changed

3 files changed

+3
-3
lines changed

seaborn/_core/plot.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1484,7 +1484,7 @@ def split_generator(keep_na=False) -> Generator:
14841484

14851485
axes_df = self._filter_subplot_data(df, view)
14861486

1487-
with pd.option_context("mode.use_inf_as_null", True):
1487+
with pd.option_context("mode.use_inf_as_na", True):
14881488
if keep_na:
14891489
# The simpler thing to do would be x.dropna().reindex(x.index).
14901490
# But that doesn't work with the way that the subset iteration

seaborn/_oldcore.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1116,7 +1116,7 @@ def comp_data(self):
11161116
parts = []
11171117
grouped = self.plot_data[var].groupby(self.converters[var], sort=False)
11181118
for converter, orig in grouped:
1119-
with pd.option_context('mode.use_inf_as_null', True):
1119+
with pd.option_context('mode.use_inf_as_na', True):
11201120
orig = orig.dropna()
11211121
if var in self.var_levels:
11221122
# TODO this should happen in some centralized location

seaborn/categorical.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1791,7 +1791,7 @@ def _lv_box_ends(self, vals):
17911791
vals = np.asarray(vals)
17921792
# Remove infinite values while handling a 'object' dtype
17931793
# that can come from pd.Float64Dtype() input
1794-
with pd.option_context('mode.use_inf_as_null', True):
1794+
with pd.option_context('mode.use_inf_as_na', True):
17951795
vals = vals[~pd.isnull(vals)]
17961796
n = len(vals)
17971797
p = self.outlier_prop

0 commit comments

Comments
 (0)