문제

I have a data like this:

enter image description here

I want to transpose it like this in python:

enter image description here

도움이 되었습니까?

해결책

df.pivot_table(values='Confirmed',index['state','State_name'],columns='date',aggfunc='sum')
라이센스 : CC-BY-SA ~와 함께 속성
제휴하지 않습니다 datascience.stackexchange
scroll top