maxframe.liteframe.LiteFrame.median#

LiteFrame.median(method='auto', numeric_only=None, **kw)#

Return the median of each column.

Parameters:
  • method ({'auto', 'tree', 'shuffle'}, default 'auto') – Execution strategy. 'auto' selects based on data size.

  • numeric_only (bool, optional) – When True, restrict to numeric columns. By default None.

  • **kw – Additional keyword arguments forwarded to the reduction.

Returns:

Single-row LiteFrame of per-column medians.

Return type:

LiteFrame

Examples

>>> import maxframe.liteframe as mlf
>>> lf = mlf.LiteFrame({'a': [1, 2, 3], 'b': [4, 5, 6]})
>>> result = lf.median()
>>> result.execute()
     a    b
0  2.0  5.0