eland.groupby.DataFrameGroupBy.min#
- DataFrameGroupBy.min(numeric_only: bool = True) pd.DataFrame #
计算每个组的最小值。
参数#
- numeric_only: {True, False, None} 默认值为 True
要返回的哪种数据类型 - True: 将所有值返回为 float64,删除 NaN/NaT 值 - None: 尽可能将所有值返回为相同的 dtype,删除 NaN/NaT - False: 尽可能将所有值返回为相同的 dtype,保留 NaN/NaT
返回值#
- pandas.DataFrame
每个组的每个数值列的最小值
另请参阅#
示例#
>>> df = ed.DataFrame( ... "http://localhost:9200", "flights", ... columns=["AvgTicketPrice", "Cancelled", "dayOfWeek", "timestamp", "DestCountry"] ... ) >>> df.groupby("DestCountry").min(numeric_only=False) AvgTicketPrice Cancelled dayOfWeek timestamp DestCountry AE 110.799911 False 0 2018-01-01 19:31:30 AR 125.589394 False 0 2018-01-01 01:30:47 AT 100.020531 False 0 2018-01-01 05:24:19 AU 102.294312 False 0 2018-01-01 00:00:00 CA 100.557251 False 0 2018-01-01 00:44:08 ... ... ... ... ... RU 101.004005 False 0 2018-01-01 01:01:51 SE 102.877190 False 0 2018-01-01 04:09:38 TR 142.876465 False 0 2018-01-01 06:45:17 US 100.145966 False 0 2018-01-01 00:06:27 ZA 102.002663 False 0 2018-01-01 06:44:44 [32 rows x 4 columns]