all_data = pd.concat((train.loc[:,'MSSubClass':'SaleCondition'], test.loc[:,'MSSubClass':'SaleCondition']),ignore_index=True)
Just add ",ignore_index=True" at the end. This should solve the issue
X.loc[X.LotFrontage.isnull(), 'LotFrontage'] = X.groupby('Neighborhood').LotFrontage.transform('median')
X = the dataset name
LotFrontage = The column that has NA's
Neighborhood = The column that is to be used for grouping
median = can be replaced by mean etc...