I have a pandas data frame that contains polynomial approximations of various functions at given points, with variable degrees to the polynomial approximation. It is arranged so that the first column is the function name, the second is the x value, then columns 2-5 are the approximations with a polynomial of the corresponding degree. I would like to make 1 plot for each function showing the convergence of the approximations to that function. I know one way to do it is to break the data frame into separate data frames based on the first column name, but wanted to know if there was a more elegant way to do it.
Edit for clarification: So in the data frame, there are two unrelated functions, say a and b. The second column contains the x values, then third and fourth are functions of x. So it might look like
fnctn x y1 y2
0 a 1 2 3
1 a 2 3 2
2 a 3 4 3
3 a 4 3 4
4 a 5 2 3
5 b 1 1 2
6 b 2 4 6
7 b 3 9 12
8 b 4 16 20
9 b 5 25 30
I would want a plot of y1 and y2 where the first column is a on one plot, and on another plot y1 and y2 where the first column is b

