我有这个Python Pandas数据框:
code name account_name value
1 john debt 123
1 john revenue 432
1 john growth 2
2 mark cost 345
2 mark debt 432
2 mark revenue 432
2 mark growth 456
我需要它看起来像这样:
code name debt revenue growth cost
1 john 123 432 2
2 mark 432 432 456 345
我想这可能是groupby和转置的组合,但是我做错了。有人可以帮忙吗?
答案 0 :(得分:1)
return(
<div>
<h1 className="navbar"> <span style={styles}> {timeOfDay} </span>
{`${firstName} ${lastName}`} It is currently {hours} clock</h1>
</div>
)