Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR PYTHON

python min date from dictionary

'''	df_dict:
index       an  bee
2015-07-02  2   5
2016-08-06  3   3
2016-09-13  2   1
2016-10-26  2   0
2016-11-02  7   2	'''

maxval = max(max(v.index) for k,v in df_dict.items())
minval = min(min(v.index) for k,v in df_dict.items())

print(maxval)
print(minval)

# Results:
2016-11-02 00:00:00
2015-07-02 00:00:00
Source by stackoverflow.com #
 
PREVIOUS NEXT
Tagged: #python #min #date #dictionary
ADD COMMENT
Topic
Name
2+7 =