'write a long int as it is by df.to_csv()

I am converting a list of Alphanumerics to hexadecimal values like the following:

for j in range(i.item_quantity):
    it = str(i.item.short_code)+"R1"+"T"+yr[2:]+ str(grn.pk) + str(j+1).zfill(2)
    it = str.encode(it)
    h = codecs.encode(it, "hex")
    print("h", h.decode("utf-8"))
    items.append(h.decode("utf-8"))
    item_type.append(i.item.description)

while it prints

h 50505231543232343739313937
h 50505231543232343739313938

when I convert this to a dataframe and further to csv file the output is like the following:

enter image description here

How can I convert them such that the complete value is shown in the csv?



Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source