Home > Software design >  Saving data in the table
Saving data in the table

Time:04-30

How I can save this:

a=1
b=2
c=3
d=4

into the table like this (I do not need header):

1 2 3 4

Thanks.

CodePudding user response:

If create DataFrame there is default header:

df = pd.DataFrame([[a,b,c,d]])
print (df)
   0  1  2  3
0  1  2  3  4

CodePudding user response:

You could just use this:

table = [a, b, c, d]
print(table)

prints:

[1, 2, 3, 4]
  • Related