I am trying to plot the following data frame. X and Y are lists. After I prepare those lists I construct the data frame via dictionary. But when I plot it doesn't actually plot.
df = pd.DataFrame({"day": day, "ndcg@k": x, "MAP@k": y})
df2 = pd.melt(df[['day', 'ndcg@k', 'MAP@k']], id_vars=['day'])
ggplot(aes(x='day', y='value', group='variable', shape='variable', colour='variable'), data=df2) + geom_line() + geom_point()
And my data looks like this (both before melt and after melt)
MAP@k day ndcg@k
0 0.201919 20150203 0.245559
1 0.198214 20150204 0.241085
day variable value
0 20150203 ndcg@k 0.245559
1 20150204 ndcg@k 0.241085
2 20150203 MAP@k 0.201919
3 20150204 MAP@k 0.198214
