Skip to content

Commit 108e7b3

Browse files
committed
Use shallow copies in pandas/plotting
1 parent ea75dd7 commit 108e7b3

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

pandas/plotting/_matplotlib/timeseries.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -75,7 +75,7 @@ def maybe_resample(series: Series, ax: Axes, kwargs: dict[str, Any]):
7575

7676
if ax_freq is not None and freq != ax_freq:
7777
if is_superperiod(freq, ax_freq): # upsample input
78-
series = series.copy()
78+
series = series.copy(deep=False)
7979
# error: "Index" has no attribute "asfreq"
8080
series.index = series.index.asfreq( # type: ignore[attr-defined]
8181
ax_freq, how="s"
@@ -142,7 +142,7 @@ def _replot_ax(ax: Axes, freq: BaseOffset):
142142
labels = []
143143
if data is not None:
144144
for series, plotf, kwds in data:
145-
series = series.copy()
145+
series = series.copy(deep=False)
146146
idx = series.index.asfreq(freq, how="S")
147147
series.index = idx
148148
# TODO #54485

0 commit comments

Comments
 (0)