如何将年份列转换为大熊猫中的一列?

时间:2019-04-22 19:07:18

标签: pandas

我已经获得了数十年来该国GDP的数据集:

## @knitr dataClean
#Prepare the text for OGD
mywordsOGD<-c("hospital number:","patient name:","general practitioner","date of procedure:","endoscopist:","2nd endoscopist:","medications:","instrument:","extent of exam:","indications:", "procedure performed:","findings:","diagnosis:")
MyOGD<-textPrep(TheOGDReportFinal$OGDReportWhole,mywordsOGD,NegEx="TRUE",Extractor="1")

我在Tableau中使用数据透视功能将年份分组为列,例如:

Country   2001 2002 2003 2004 2005 

U.S        1   2     3    4    5

U.K        6   7     9    9   10

.....

如何使用大熊猫做同样的事情?

0 个答案:

没有答案