Kaggle competition: Digit Recognizer
<SOS> metric: categorizationaccuracy Kaggle data source: digit-recognizer<import_modules>
import pandas as pd
import pandas as pd<load_from_csv>
mnist_test = pd.read_csv("/kaggle/input/mnist-fashion-data-classification/mnist_test.csv")
 mnist_train = pd.read_csv("/kaggle/input/mnist-fashion-data-classification/mnist_train.csv")
mnist_test = pd.read_csv("/kaggle/input/mnist-fashion-data-classification/mnist_test.csv")
 mnist_train = pd.read_csv("/kaggle/input/mnist-fashion-data-classification/mnist_train.csv")
<load_from_csv>
sample_submission = pd.read_csv("/kaggle/input/digit-recognizer/sample_submission.csv")
 train = pd.read_csv("/kaggle/input/digit-recognizer/train.csv")
 test = pd.read_csv("/kaggle/input/digit-recognizer/test.csv" )
sample_submission = pd.read_csv("/kaggle/input/digit-recognizer/sample_submission.csv")
 train = pd.read_csv("/kaggle/input/digit-recognizer/train.csv")
 test = pd.read_csv("/kaggle/input/digit-recognizer/test.csv" )<feature_engineering>
test['dataset'] = 'test'
test['dataset'] = 'test'<feature_engineering>
train['dataset'] = 'train'
train['dataset'] = 'train'<concatenate>
dataset = pd.concat([train.drop('label', axis=1), test] ).reset_index()
dataset = pd.concat([train.drop('label', axis=1), test] ).reset_index()<concatenate>
mnist = pd.concat([mnist_train, mnist_test] ).reset_index(drop=True)
 labels = mnist['label'].values
mnist.drop('label', axis=1, inplace=True)
 mnist.columns = cols
mnist = pd.concat([mnist_train, mnist_test] ).reset_index(drop=True)
 labels = mnist['label'].values
mnist.drop('label', axis=1, inplace=True)
 mnist.columns = cols<sort_values>
idx_mnist = mnist.sort_values(by=list(mnist.columns)).index
dataset_from = dataset.sort_values(by=list(mnist.columns)) ['dataset'].values
original_idx = dataset.sort_values(by=list(mnist.columns)) ['index'].values
idx_mnist = mnist.sort_values(by=list(mnist.columns)).index
dataset_from = dataset.sort_values(by=list(mnist.columns)) ['dataset'].values
original_idx = dataset.sort_values(by=list(mnist.columns)) ['index'].values<feature_engineering>
for i in range(len(idx_mnist)) :
if dataset_from[i] == 'test':
sample_submission.loc[original_idx[i], 'Label'] = labels[idx_mnist[i]]
<save_to_csv><EOS> 
sample_submission.to_csv('submission.csv', index=False )