File tree Expand file tree Collapse file tree 1 file changed +8
-9
lines changed
bigframes/pandas/core/methods Expand file tree Collapse file tree 1 file changed +8
-9
lines changed Original file line number Diff line number Diff line change @@ -100,7 +100,7 @@ def _describe(
100100
101101
102102def _get_aggs_for_dtype (dtype ) -> list [aggregations .UnaryAggregateOp ]:
103- if dtype in dtypes .NUMERIC_BIGFRAMES_TYPES_RESTRICTIVE :
103+ if dtypes .is_numeric ( dtype , include_bool = False ) :
104104 return [
105105 aggregations .count_op ,
106106 aggregations .mean_op ,
@@ -111,14 +111,13 @@ def _get_aggs_for_dtype(dtype) -> list[aggregations.UnaryAggregateOp]:
111111 aggregations .ApproxQuartilesOp (3 ),
112112 aggregations .max_op ,
113113 ]
114- elif dtype in dtypes .TEMPORAL_NUMERIC_BIGFRAMES_TYPES :
114+ elif dtypes . is_datetime_like ( dtype ) or dtypes .is_date_like ( dtype ) :
115115 return [aggregations .count_op ]
116- elif dtype in [
117- dtypes .STRING_DTYPE ,
118- dtypes .BOOL_DTYPE ,
119- dtypes .BYTES_DTYPE ,
120- dtypes .TIME_DTYPE ,
121- ]:
116+ elif (
117+ dtypes .is_string_like (dtype )
118+ or dtypes .is_binary_like (dtype )
119+ or dtypes .is_time_like (dtype )
120+ ):
122121 return [aggregations .count_op , aggregations .nunique_op ]
123122 else :
124- return []
123+ return [aggregations . count_op ]
You can’t perform that action at this time.
0 commit comments