How to shift rows values as columns in pandas? Input: I have csv file like below as input....

ID, Year,Specialty,AgeRange,PlaceSvc,Count, Group
101,2009,Internal,  20-29,  Office,     0,  PRGNCY
101,2010,Emergency, 20-29,  Urgent Care,0,  GIOBSENT
101,2011,Internal,  20-29,  Office,     0,  GYNEC1
102,2010,Other,     30-39,  Office,     1,  PRGNCY
102,2010,Laboratory,30-39,  Independent,1,  MSC2a3
103,2009,Laboratory,30-39,  Independent,1,  MSC2a3
103,2011,Other,     30-39,  Office,     0,  PRGNCY


Output: I want output like below...

ID,Year,Specialty_Internal,Specialty_Emergency,Specialty_Labrotory,Specialty_Other,Age20_29,Age30_39,PlaceSvc_Urgent,PlaceSvc_Office,PlaceSvc_Independent,Count,GroupPrgncy,GroupGiobsent,GroupGynec1,GroupMsc2a3

101,2009,1,0,0,0,1,0,0,1,0,0,1,0,0,0
101,2010,0,1,0,0,1,0,1,0,0,0,0,1,0,0
101,2011,1,0,0,0,1,0,0,1,0,0,0,0,1,0
102,2010,0,0,1,1,0,1,0,1,1,2,1,0,0,1
103,2009,0,0,1,0,0,1,0,0,1,1,0,0,0,1
103,2011,0,0,0,1,,1,0,1,0,0,1,0,0,0


How can i do this by pandas? or is there any other techinque to do this?
You want pandas.get_dummies.

If you call get_dummies on a categorical column, it will output the binary dummy variables you're looking for. You should then be able to merge this with your original DataFrame on the index, or construct a new DataFrame using only the columns you want.