Let's say I have the following data frame:
test = pd.DataFrame({'X': [1,2,3,4,5,6,7,8,9,10], 'Y': [1,2,3,4,5,6,7,8,9,10], 'Season': [1,2,3,2,1,3,2,1,3,2]})
test
X Y Season
0 1 1 1
1 2 2 2
2 3 3 3
3 4 4 2
4 5 5 1
5 6 6 3
6 7 7 2
7 8 8 1
8 9 9 3
9 10 10 2
How could I go about looping through the season column and plotting all the points for said seasons (on different plots)? I've searched questions similar to this and attempted the code, but none seem to be quite the same as this particular situation. Thanks!
EDIT: I would like the plots to be sns regplots if possible
test.groupby('Season').plot(x='X', y='Y')?