.item() will do the job:
p1 = df[df["column2"]==df.column2.max()].column1.item()
print(p1)
This way you can extract the actual value from pandas dataframe and store it in variable for later use.
.item() will do the job:
p1 = df[df["column2"]==df.column2.max()].column1.item()
print(p1)
This way you can extract the actual value from pandas dataframe and store it in variable for later use.