2

Does anyone know, how to get from this:

A B C D E F G
Rate RS 1.0 1.0 1.0 1.0 1.0 1.0

to this:

A B C D E F G
Rate RS RS RS RS RS RS RS
John Kugelman
  • 349,597
  • 67
  • 533
  • 578
carrera997
  • 27
  • 5

1 Answers1

1

Try using slice assignment:

df[:] = df.iloc[0, 0]

Or if you want to specify the Rate index:

>>> df[:] = df.loc['Rate'].iloc[0]
>>> df
       A   B   C   D   E   F   G
Rate  RS  RS  RS  RS  RS  RS  RS
>>> 
U13-Forward
  • 69,221
  • 14
  • 89
  • 114