def add_intercept(panel, name='intercept'):
 panel = panel.copy()
 panel[name] = 1.0
 return panel.consolidate()

def add_intercept ( panel , name = 'intercept' ) : panel = panel . copy ( ) panel [ name ] = 1.0 return panel . consolidate ( )
add column of ones to input panel parameters panel: panel / dataframe name: string .