### Using `numpy.where`:
                        
                        
                        
                            df.assign(
                        
                            	target=np.where(df.index.isin(df.groupby(['Group1', 'Group2']).Value.idxmax()),
                        
                            	df.Value, 0)
                        
                            )
                        
                        
                        
                        <!- ->
                        
                        
                        
                               Group1  Group2  Value  target
                        
                            0       1       3      0       0
                        
                            1       1       3      1       1
                        
                            2       1       4      1       1
                        
                            3       1       4      1       0
                        
                            4       2       5      5       5
                        
                            5       2       5      1       0
                        
                            6       2       6      0       0
                        
                            7       2       6      1       1
                        
                        
                        
                        
                        
                
             
            
                
                    
                        Using `idxmax`
                        
                        
                        
                            df['Newcol']=0
                        
                            df.loc[df.Value.ne(0).groupby(df['Group']).idxmax(),'Newcol']=1
                        
                            df
                        
                            Out[41]: 
                        
                               Group  Value  Target_Column  Newcol
                        
                            0      1      0              0       0
                        
                            1      1      0              0       0
                        
                            2      1      1              1       1
                        
                            3      1      2              0       0
                        
                            4      2      0              0       0
                        
                            5      2      1              1       1
                        
                            6      2      0              0       0
                        
                            7      2      1              0       0