Q:

Plotting lists in a Pandas dataframe

Consider the following dataframe example:
df = pd.DataFrame({'date':['12-01', '12-02', '12-03'],'list1': np.random.randint(0, 10, (3,5)).tolist(), 
               'list2': np.random.randint(0, 10, (3,5)).tolist()}, 
               index=list('ABC'))

I would like to plot the lists in the dataframe in such a way that I end up with 3 lines in my graph: A, B and C with for each one, 'list1' as x values and 'list2' as y values.
I started off by trying to plot the columns directly but the following returns an error:
In: df.iloc[0].plot(x='list1', y='list2')

Out: TypeError: Empty 'DataFrame': no numeric data to plot

I could iterate over the rows of the dataframe and append the lists to a new list to plot them, but I feel that this defeats the purpose of storing my data in a dataframe (I have additional columns with ancillary data) and I am sure that there is a better way to do this.
I have about 20 entries in each dataframe (grouped from a larger dataframe) and the main purpose is to visually check if the values (output from an instrument) are in a certain range.

A:

Why not iterate the rows and plot the values?
for i, row in df.iterrows():
    plt.plot(row['list1'], row['list2'])

