Im new to Python and I want to split the single row that my code prints, into multiple rows, specifically I want to separate each row where the String Variable Starts...
df = pd.DataFrame()
Var1 = "X"
Var2 = 300
Var3 = Var2*15
Var4 = Var3*0.75
df2 = df.append([Var1, Var2, Var3, Var4])
Var5 = "Y"
Var6 = 650
Var7 = Var2*20
df2 = df2.append([Var5, Var6, Var7])
print(df2.T)
If you run this code, you'll notice that there is only one row in the DataFrame, I need the first 4 Variables in one row and the last 3 Variables in another row