MCPcopy
hub / github.com/pandas-dev/pandas / min

Method min

pandas/core/resample.py:1215–1267  ·  view source on GitHub ↗

Compute min value of group. Parameters ---------- numeric_only : bool, default False Include only float, int, boolean columns. .. versionchanged:: 2.0.0 numeric_only no longer accepts ``None``. min_count : int, defa

(
        self,
        numeric_only: bool = False,
        min_count: int = 0,
    )

Source from the content-addressed store, hash-verified

1213
1214 @final
1215 def min(
1216 self,
1217 numeric_only: bool = False,
1218 min_count: int = 0,
1219 ):
1220 """
1221 Compute min value of group.
1222
1223 Parameters
1224 ----------
1225 numeric_only : bool, default False
1226 Include only float, int, boolean columns.
1227
1228 .. versionchanged:: 2.0.0
1229
1230 numeric_only no longer accepts ``None``.
1231
1232 min_count : int, default 0
1233 The required number of valid values to perform the operation. If fewer
1234 than ``min_count`` non-NA values are present the result will be NA.
1235
1236 Returns
1237 -------
1238 Series or DataFrame
1239 Compute the minimum value in the given Series or DataFrame.
1240
1241 See Also
1242 --------
1243 core.resample.Resampler.max : Compute max value of group.
1244 core.resample.Resampler.mean : Compute mean of groups, excluding missing values.
1245 core.resample.Resampler.median : Compute median of groups, excluding missing
1246 values.
1247
1248 Examples
1249 --------
1250 >>> ser = pd.Series(
1251 ... [1, 2, 3, 4],
1252 ... index=pd.DatetimeIndex(
1253 ... ["2023-01-01", "2023-01-15", "2023-02-01", "2023-02-15"]
1254 ... ),
1255 ... )
1256 >>> ser
1257 2023-01-01 1
1258 2023-01-15 2
1259 2023-02-01 3
1260 2023-02-15 4
1261 dtype: int64
1262 >>> ser.resample("MS").min()
1263 2023-01-01 1
1264 2023-02-01 3
1265 Freq: MS, dtype: int64
1266 """
1267 return self._downsample("min", numeric_only=numeric_only, min_count=min_count)
1268
1269 @final
1270 def max(

Callers 4

_get_time_binsMethod · 0.45
_get_time_delta_binsMethod · 0.45
_get_period_binsMethod · 0.45
asfreqFunction · 0.45

Calls 1

_downsampleMethod · 0.95

Tested by

no test coverage detected