def create_n_gram_df(df, n_pad):
n_pad_2 = int((n_pad - <NUM_LIT:1>)/<NUM_LIT:2>)<EOL>for i in range(n_pad_2):<EOL><INDENT>df['<STR_LIT>'.format(i+<NUM_LIT:1>)] = df['<STR_LIT>'].shift(i + <NUM_LIT:1>)<EOL>df['<STR_LIT>'.format(i+<NUM_LIT:1>)] = df['<STR_LIT:type>'].shift(i + <NUM_LIT:1>)<EOL>df['<STR_LIT>'.format(i+<NUM_LIT:1>)] = df['<STR_LIT>'].shift(-i - <NUM_LIT:1>)<EOL>df['<STR_LIT>'.format(i+<NUM_LIT:1>)] = df['<STR_LIT:type>'].shift(-i - <NUM_LIT:1>)<EOL><DEDENT>return df[n_pad_2: -n_pad_2]<EOL>
Given input dataframe, create feature dataframe of shifted characters