How to select first result from pandas .sort_values()

Viewed 153

I'm trying to select the first result from an excel sheet result in a specific column for .sort_values()

import pandas as pd

df = pd.read_excel (r'/PATH/filename.xlsx')

dff = pd.DataFrame(df, columns = ['Unnamed: 4'])
sbl = dff.sort_values('Unnamed: 4')
print sbl.head(n=4)

#Unnamed: 4
27      18465
29      18532
28      18550    
30      18594

How do I take the first result 27 18465 and only use 18465 for mathematical equations?

1 Answers
Related