how to avoid removing 0 from msb in python panda dataframe
Question: i have data in column like `0123456789` after reading from a file it will get
like `123456789` where column name is `msisdn`

how to fix this issue

am using the pandas script as follows

    
    
    #!/usr/bin/env python 
    import gc
    import pandas
    csv1 = pandas.read_csv('/home/subin/Desktop/a.txt')
    csv2 = pandas.read_csv('/home/subin/Desktop/b.txt')
    merged = pandas.merge(csv1, csv2,left_on=['MSISDN'],right_on=['MSISDN'],how='left',suffixes=('#x', '#y'), sort=True).fillna('0')
    merged.to_csv("/home/subin/Desktop/amergeb_out.txt", index=False, float_format='%.0f')
    


Answer: You can cast column `msisdn` to `string` by parameter `dtype` in
[`read_csv`](http://pandas.pydata.org/pandas-
docs/stable/generated/pandas.read_csv.html):

    
    
    temp=u"""msisdn
    0123456789
    0123456789"""
    #after testing replace io.StringIO(temp) to filename
    df = pd.read_csv(io.StringIO(temp), dtype={'msisdn': str})
    print (df)
           msisdn
    0  0123456789
    1  0123456789
    

