eland.DataFrame.max#
- DataFrame.max(numeric_only: Optional[bool] = None) Series #
返回每个数值列的最大值
TODO - 实现其余的 pandas 参数,目前不支持非数值
参数#
- numeric_only: {True, False, None} 默认值为 None
要返回的哪种数据类型 - True: 将所有值返回为 float64,删除 NaN/NaT 值 - None: 尽可能将所有值返回为相同的数据类型,删除 NaN/NaT - False: 尽可能将所有值返回为相同的数据类型,保留 NaN/NaT
返回值#
- pandas.Series
每个数值列的最大值
另请参阅#
示例#
>>> df = ed.DataFrame('http://localhost:9200', 'flights', columns=["AvgTicketPrice", "Cancelled", "dayOfWeek", "timestamp", "DestCountry"]) >>> df.max() AvgTicketPrice 1199.73 Cancelled True dayOfWeek 6 timestamp 2018-02-11 23:50:12 dtype: object
>>> df.max(numeric_only=True) AvgTicketPrice 1199.729004 Cancelled 1.000000 dayOfWeek 6.000000 dtype: float64
>>> df.max(numeric_only=False) AvgTicketPrice 1199.73 Cancelled True dayOfWeek 6 timestamp 2018-02-11 23:50:12 DestCountry NaN dtype: object