I already sorted the data and the dataframe now is like this:
Tr Srate(V/ns)mean Tf Srate(V/ns)mean
CPULabel
100HiBW_Fast 3.16 3.09
100LoBW_Fast 3.16 3.09
BP100_Fast 3.16 3.06
My dataframe is slew_rate_max. I tried to use:
slew_rate_max.max()
I expected the result to be 3.16. However, I got the max values of both columns individually.
Tr Srate(V/ns)mean 3.16
Tf Srate(V/ns)mean 3.09
dtype: float64
How to get the max value of the whole dataframe not of each column?
Try:
slew_rate_max.max().max()
slew_rate_max.max() returns a series with the max of each column, then taking the max again of that series will give you the max of the entire dataframe.
or
slew_rate_max.values.max()
slew_rate_max.values converts the dataframe to a np.ndarray then using numpy.ndarray.max which as an argument axis that the default is None, this gives the max of the entire ndarray.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With