我当前的数据框如下:
CREATED_DATE STATE
02/03/15 0:00 Texas
02/03/15 0:00 Texas
02/03/17 16:19 Texas
02/03/15 16:19 Florida
02/03/16 16:19 Florida
02/03/16 16:19 Florida
02/03/15 16:19 Alabama
02/03/16 16:19 Alabama
02/03/15 16:19 North Carolina
02/03/15 16:19 North Carolina
02/03/16 16:19 North Carolina
我想将其更改为:
STATE 2015 2016 2017
Texas 2 0 1
Florida 1 2 0
Alabama 1 1 0
North Carolina 2 1 0