Skip to content

Commit f954392

Browse files
committed
Moved conversion to if percentiles is not None
1 parent d192ac7 commit f954392

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

pandas/core/generic.py

+3-3
Original file line numberDiff line numberDiff line change
@@ -5255,16 +5255,16 @@ def abs(self):
52555255

52565256
@Appender(_shared_docs['describe'] % _shared_doc_kwargs)
52575257
def describe(self, percentiles=None, include=None, exclude=None):
5258-
# explicit conversion of `percentiles` to list
5259-
percentiles = list(percentiles)
5260-
52615258
if self.ndim >= 3:
52625259
msg = "describe is not implemented on Panel or PanelND objects."
52635260
raise NotImplementedError(msg)
52645261
elif self.ndim == 2 and self.columns.size == 0:
52655262
raise ValueError("Cannot describe a DataFrame without columns")
52665263

52675264
if percentiles is not None:
5265+
# explicit conversion of `percentiles` to list
5266+
percentiles = list(percentiles)
5267+
52685268
# get them all to be in [0, 1]
52695269
self._check_percentile(percentiles)
52705270

0 commit comments

Comments
 (0)