Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR PYTHON

pandas line plot dictionary

### credit to StackOverflow user in source link

import matplotlib.pylab as plt

lists = sorted(d.items()) # sorted by key, return a list of tuples

x, y = zip(*lists) # unpack a list of pairs into two tuples

plt.plot(x, y)
plt.show()
Source by stackoverflow.com #
 
PREVIOUS NEXT
Tagged: #pandas #line #plot #dictionary
ADD COMMENT
Topic
Name
2+4 =