import pandas as pd a="D:\\statashu\\2\\1xx.dta" df = pd.read_stata(a) for index,row in df.iterrows(): print(row["id"])