verticapy.vDataColumn.max#
- vDataColumn.max() bool | float | str | timedelta | datetime #
Aggregates the vDataFrame by applying the ‘MAX’ aggregation, which calculates the maximum value, for the input column. This aggregation provides insights into the highest values within the dataset, aiding in understanding the data distribution.
Returns#
- PythonScalar
maximum
Examples#
For this example, let’s generate a dataset and calculate the maximum of a column:
import verticapy as vp data = vp.vDataFrame( { "x": [1, 2, 4, 9, 10, 15, 20, 22], "y": [1, 2, 1, 2, 1, 1, 2, 1], "z": [10, 12, 2, 1, 9, 8, 1, 3], } ) data["x"].max() Out[3]: 22.0
Note
All the calculations are pushed to the database.
Hint
For more precise control, please refer to the
aggregate
method.