A couple of assumptions that yours is apnt_ymdalready a date or a date if you cannot do this:
df['apnt_ymd'] = pd.to_datetime(df['apnt_ymd'])
So, we can groupbycolumn nm_emp_listand then calculate the lowest value for apnt_ymdand return the index using idxmin(). Then we can use this index for the original df to display the desired result:
In [4]:
df.loc[df.groupby('nm_emp_lst')['apnt_ymd'].idxmin()]
Out[4]:
id ssno nm_emp_lst nm_emp_fst apnt_ymd
4 175701 987654321 DUBE JEFFREY 2013-04-21
3 102872 123456789 GREENE ALTON 2011-04-10
6 84785 126644444 IRVING SARA 2012-05-16
9 24434 777888999 LEMERISE GEORGE 2011-05-08
source
share