Hello guys I have this dataset:
import pandas as pd
# intialise data of lists.
data = {'Year':['2017', '2018', '2018', '2019'],'Month':['1', '1', '2', '3'],'Outcome':['dead', 'alive', 'alive', 'empty'], 'outcome_count':[20, 21, 19, 18]}
# Create DataFrame
dfy = pd.DataFrame(data)
# Print the output.
print(dfy)
I do want to plot Outcome against period which should be month and year. Now, month and year are on different columns, how can I combine them so that I have a graph of the outcome against month and year. legends should have outcome name?