After loading you can call equals on the id column:
df['id'].equals(df1['id'])
This will return True of False if they are exactly the same, in length and same values in the same order
In [3]:
df = pd.DataFrame({'id':np.arange(10)})
df1 = pd.DataFrame({'id':np.arange(10)})
df.id.equals(df1.id)
Out[3]:
True
In [7]:
df = pd.DataFrame({'id':np.arange(10)})
df1 = pd.DataFrame({'id':[0,1,1,3,4,5,6,7,8,9]})
df.id.equals(df1.id)
Out[7]:
False
In [8]:
df.id == df1.id
Out[8]:
0 True
1 True
2 False
3 True
4 True
5 True
6 True
7 True
8 True
9 True
Name: id, dtype: bool
To load the csvs:
df = pd.read_csv('file_1.csv')
df1 = pd.read_csv('file_2.csv') # I'm assuming your real other csv is not the same name as file_1.csv
Then you can perform the same comparison as above:
df.id.equals(df1.id)
If you just want to compare the id columns you can specify just to load that column:
df = pd.read_csv('file_1.csv', usecols=['id'])
df1 = pd.read_csv('file_2.csv', usecols=['id'])