我正在寻找一种解决方案,用于根据条件与数据框的列名匹配来放置值。
示例:
A = (5000, 3500) # Column names where I want to place B
B = 'Insert here' # String to place into Dataframe
Resulting in the empty Dataframe on the left turning into Dataframe:
Index 3400 3500 4500 5000 Index 3400 3500 4500 5000
3400 x x x x 3400 x x x x
3500 x x x x 3500 x x x x
4500 x x x x 4500 x x x x
5000 x x x x 5000 x B x x