I've got a dataframe that looks like this:
Symbol Date Amount Portfolio Value
0 BLL 2020-01-06 5116.83 5069.42
1 BLL 2020-03-16 5104.98 4615.97
5 BLL 2020-03-17 5116.83 5118.95
6 BLL 2020-06-15 5104.95 5401.712
7 BLL 2020-06-16 5116.83 5570.23
11 IBB 2014-03-04 542.98 179.48
12 IBB 2014-10-10 810.97 262.33
13 IBB 2016-09-30 810.71 289.45
14 IBB 2016-10-03 810.97 290.08
15 IBB 2016-12-29 810.69 267.19
16 IBB 2016-12-30 810.97 265.55
52 SCHE2017-07-05 1915.76 1922.68
53 SCHE2017-08-02 1942.2 2063.10
54 SCHE2017-12-22 1891.79 2158.26
57 SCHE2017-12-26 1942.2 2208.64
60 SCHE2018-12-17 1892.65 1870.20
63 SCHE2018-12-18 1942.2 1927.48
How do I create multiple plots for each stock in the column "Symbol" that graphs both the "Amount" column and the "Portfolio Value" by the date?
Here's what I've got so far:
grouped = df.groupby(['Symbol'])
for key, group in grouped:
group.plot('Date', 'Amount', label = key)
Which gives me a separate plot for each Symbol that looks like:
I for whatever reason, cannot find out how to plot another column (y2) on the same graph. How do I get this for each Symbol: