'Plot a lineal graph with columns diverging from main column

Hello I want to create a lineal graph of this Dataframe

A  B  C  D
2  1  5  7
1  4  3  1

I would like to know the way to create a line graph with this idea:

Using A as Main Colum

So I want a resulting line graph with this values

A  B  C  D
0  -1 3  5
0  3  2  0

The main idea I have is to duplicate the DF and do something like this

df2=df
df2["B"]= df2["B"]-df2["A"]
df2["C"]= df2["C"]-df2["A"]
df2["D"]= df2["D"]-df2["A"]
df2["A"]=df2["A"]-df2["A"]

df2.plot()

Do you have another way to set this graph faster?



Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source