Skip to content

Commit 9993ec4

Browse files
authored
CLN: Remove unused rewrite warning (#50403)
1 parent 7bc699f commit 9993ec4

File tree

1 file changed

+1
-12
lines changed

1 file changed

+1
-12
lines changed

pandas/core/reshape/pivot.py

Lines changed: 1 addition & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,6 @@
2121
Appender,
2222
Substitution,
2323
)
24-
from pandas.util._exceptions import rewrite_warning
2524

2625
from pandas.core.dtypes.cast import maybe_downcast_to_dtype
2726
from pandas.core.dtypes.common import (
@@ -165,17 +164,7 @@ def __internal_pivot_table(
165164
values = list(values)
166165

167166
grouped = data.groupby(keys, observed=observed, sort=sort)
168-
msg = (
169-
"pivot_table dropped a column because it failed to aggregate. This behavior "
170-
"is deprecated and will raise in a future version of pandas. Select only the "
171-
"columns that can be aggregated."
172-
)
173-
with rewrite_warning(
174-
target_message="The default value of numeric_only",
175-
target_category=FutureWarning,
176-
new_message=msg,
177-
):
178-
agged = grouped.agg(aggfunc)
167+
agged = grouped.agg(aggfunc)
179168

180169
if dropna and isinstance(agged, ABCDataFrame) and len(agged.columns):
181170
agged = agged.dropna(how="all")

0 commit comments

Comments
 (0)