Created
January 4, 2017 07:00
-
-
Save vi3k6i5/3bdd4fdaca7e41553a1432f1a1c37121 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# part solution to http://stackoverflow.com/questions/41447277/trouble-using-pandas-read-html/41447560#41447560 | |
max_value = [0,0] | |
for item in [(int(val.split('/')[0]), int(val.split('/')[1])) for val in df['Date Posted'].values]: | |
if item[0] > max_value[0]: | |
max_value[0] = item[0] | |
elif item[0] == max_value[0]: | |
if item[1] > max_value[1]: | |
max_value[1] = item[1] | |
max_date_posted = str(max_value[0]) + '/' + str(max_value[1]) | |
df[df['Date Posted'] == max_date_posted] |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment