Assuming your dataset is a pandas DataFrame and you want to find the maximum value of row x, you can use the .loc
accessor to select that row and the .max()
method to find its maximum value. Here's an example:
main.py215 chars14 lines
In this example, we first create a DataFrame with three columns and three rows. Then we use .loc[0]
to select the first row (rows are 0-indexed in pandas). Finally, we call the .max()
method to find the maximum value of that row, which is 7.
gistlibby LogSnag