Search
 
SCRIPT & CODE EXAMPLE
 

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()
Comment

PREVIOUS NEXT
Code Example
Python :: cronometer python 
Python :: python how to sum two lists 
Python :: subscript in python 
Python :: how to revert a list python 
Python :: rename column by indexing 
Python :: df sort by column names 
Python :: mkdir if not exists python 
Python :: how to install python library 
Python :: pandas df to list of dictionaries 
Python :: python get third friday of the month 
Python :: Class In Python With Instance Method 
Python :: python generate string 
Python :: append multiple values to 2d list python 
Python :: input function python 
Python :: How to Get the Union of Sets in Python 
Python :: python compute cross product 
Python :: arrayfield in django 
Python :: how to get SITE_ID in django....shell 
Python :: matlab filter in python 
Python :: python singleton 
Python :: how to create pyw file 
Python :: Display head of the DataFrame 
Python :: Python list files only in given directory 
Python :: pandas change column type 
Python :: assert integer python 
Python :: streamlit sidebar width 
Python :: Genisim python 
Python :: r char to numeric dataframe all columns 
Python :: pd.datetimeindex 
Python :: readlines 
ADD CONTENT
Topic
Content
Source link
Name
7+4 =