Copy certain values from dictionary in python -
i implementing dictionary data structure store per day results of climate model. stability reasons first , last 5 days left out. need plot values. there effective way this?
the data of form:
dict = { 'day1': 200435, 'day2': 23354235, ..., 'day30': 32435 } plt(dict.keys(), dict.values())
you can use pandas both filtering , plotting of data.
data = {'day1':200435,'day2':23354235} df = pd.dataframe.from_dict(data, 'index').sort_index() # plot selected days df['day5':'day25'].plot()
Comments
Post a Comment