1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40
| File /opt/anaconda3/lib/python3.11/site-packages/pandas/core/generic.py:11552, in NDFrame.describe(self, percentiles, include, exclude)
11310 @final
11311 def describe(
11312 self,
(...)
11315 exclude=None,
11316 ) -> Self:
11317 """
11318 Generate descriptive statistics.
11319
(...)
11550 max NaN 3.0
11551 """
> 11552 return describe_ndframe(
11553 obj=self,
11554 include=include,
11555 exclude=exclude,
11556 percentiles=percentiles,
11557 ).__finalize__(self, method="describe")
File /opt/anaconda3/lib/python3.11/site-packages/pandas/core/methods/describe.py:91, in describe_ndframe(obj, include, exclude, percentiles)
87 describer = SeriesDescriber(
88 obj=cast("Series", obj),
89 )
90 else:
---> 91 describer = DataFrameDescriber(
92 obj=cast("DataFrame", obj),
93 include=include,
94 exclude=exclude,
95 )
97 result = describer.describe(percentiles=percentiles)
98 return cast(NDFrameT, result)
File /opt/anaconda3/lib/python3.11/site-packages/pandas/core/methods/describe.py:160, in DataFrameDescriber.__init__(self, obj, include, exclude)
157 self.exclude = exclude
159 if obj.ndim == 2 and obj.columns.size == 0:
--> 160 raise ValueError("Cannot describe a DataFrame without columns")
162 super().__init__(obj)
ValueError: Cannot describe a DataFrame without columns |
Partager