My code consists of removing the redundancy from the code as a form of backup. But when writing again in the file it removes the zeroes to the left of the 1. Like in the image below
mydataset2 = pd.read_csv('fieldstatebackup.binetflow')
mydataset2.drop_duplicates(['State2','State'], keep='first', inplace=True)
mydataset2.to_csv('fieldstatebackup.binetflow', columns=['State2', 'State'], index=False)
The easiest solution is probably to read the data as string. Otherwise, the data is read as numerical where leading zeros are dropped. Plus the data is interpreted using decimal numeral system by default, which is not what you'd want anyway.
pd.read(csv('fieldstatebackup.binetflow', dtype=str)