import pandas as pd

filename_1 = open("DataSerraGrugliasco-Unlabeled.csv")
filename_2 = open("DataSerraGrugliasco.csv")
filename_3 = "DataSerraGrugliasco-Labeled.csv"

data1 = pd.read_csv(filename_1)
data1.sort_values('index',inplace=True)
data2 = pd.read_csv(filename_2)
data2.sort_values('index',inplace=True)
data3 = data1.merge(data2.loc[:,['index','Status']],'inner')
data3.set_index(keys='index', inplace=True)

data3.to_csv(filename_3)