Skip to content

Commit 2c1fd7d

Browse files
committed
Copy the df and transform all columns to np.array.
Signed-off-by: HE, Tao <[email protected]>
1 parent 10e9b54 commit 2c1fd7d

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

pandas/plotting/_core.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -368,11 +368,11 @@ def _compute_plot_data(self):
368368

369369
# GH25587: cast ExtensionArray of pandas (IntegerArray, etc.) to
370370
# np.ndarray before plot.
371+
numeric_data_np = numeric_data.copy()
371372
for col in numeric_data:
372-
if is_extension_array_dtype(numeric_data[col]):
373-
numeric_data[col] = np.asarray(numeric_data[col])
373+
numeric_data_np[col] = np.asarray(numeric_data[col])
374374

375-
self.data = numeric_data
375+
self.data = numeric_data_np
376376

377377
def _make_plot(self):
378378
raise AbstractMethodError(self)

0 commit comments

Comments
 (0)