May I ask how to avoid scientific notation when using Pandas to generate data to excel?

problem description

I read the difference data from two different excel, and then put them into a new excel. It is normal to display a column of ID number under IDE, but it becomes a scientific counting method in excel. Is there a way to make a column of ID number directly to excel display is in plain text format?

the environmental background of the problems and what methods you have tried

looked for information on the Internet for a while, but it didn"t work with .astype (int64).

related codes

/ / Please paste the code text below (do not replace the code with pictures)

import pandas as pd
import numpy as np

np.set_printoptions (suppress=True)
df1 = pd.read_excel ("A.xlsx")-sharp Table A basic data-Matrix
df2 = pd.read_excel (" B.xlsx")-sharp Table B basic data
a = df2 [(df2 ["ID number"]! = df1 ["ID number"]) & (df1 ["name"] = = df2 ["name"])
b = df2 [(df2 ["ID number") ] = df1 ["ID number"] .astype ("str")) & (df1 [" name"]! = df2 ["name"])

X = [a, b]
Z = pd.concat (X)
print (Z)
writer = pd.ExcelWriter ("difference .xlsx")
a.to_excel (writer, "sheet1")
b.to_excel (writer," sheet2")
writer.save ()

what result do you expect? What is the error message actually seen?

the expected result is that a normal ID number is generated in excel. In fact, not only does it not generate a normal ID number, but the number is also wrong. The last four became 0000

.
Mar.31,2021

this is because excel handles large numbers that exceed a certain number of digits. The solution can be to force the data type of the ID card column to a string or object, before writing it:
a ['ID number'] = a ['ID number'] .astype ('str')
give it a try.

MySQL Query : SELECT * FROM `codeshelper`.`v9_news` WHERE status=99 AND catid='6' ORDER BY rand() LIMIT 5
MySQL Error : Disk full (/tmp/#sql-temptable-64f5-1e43de5-44a6a.MAI); waiting for someone to free some space... (errno: 28 "No space left on device")
MySQL Errno : 1021
Message : Disk full (/tmp/#sql-temptable-64f5-1e43de5-44a6a.MAI); waiting for someone to free some space... (errno: 28 "No space left on device")
Need Help?