Donate. I desperately need donations to survive due to my health

Get paid by answering surveys Click here

Click here to donate

Remote/Work from Home jobs

Copying a Dataframe Column Numerous Times Within the Same Dataframe

I am missing something very basic here but can't get it right.

I have a One column Dataframe that looks like this:

df        Weight

1/1/2003   .23
1/2/2003   .24
1/3/2003   .34
....

I simply want this result

    df     Weight  Weight  Weight   ...

1/1/2003   .23      .23     .23     ...
1/2/2003   .24      .24     .24     ...
1/3/2003   .34      .34     .34     ...
....

I tried the following:

df = df[['Weight]* 200 ]

to get 200 identical columns

i get

df      1/1/2003   1/2/2003

Weight    .23       .23
Weight    .23       .23 
Weight    .23       .23
....

What am I doing wrong?

Comments