I have a python program which give me around 200 csv files with 25 records each. I want to merge these 200 files into one file csv and load it in SQL server. (I am assuming this is good way to load)
My final aim is to have one csv file with all the data of 200 csv and load the data on SQL server as well.
All the files have same columns. One of the column contains ISBN-13 book number. When I merge the file through the following code, the ISBN-13 number gets converted into scientific notation (9780981454221 gets converted to 9.78098145422e+12) and I am losing information. (like the last digit) Is there any way to avoid this. Here is my code and sample data
import pandas as pd
import os
import csv
import glob
os.chdir("//network/My Folder/")
df=pd.DataFrame()
for files in glob.glob("*.csv"):
print files
df = pd.concat([df,pd.read_csv(files)],axis=0)
df.to_csv("test.csv", sep=',', encoding='utf-8',index=False)
Data in csv file
Book ISBN-13
Book_1 9780262527132
Book_2 9780071495844
Book_3 9780679734031
Book_4 9781621840862
Book_5 9781614271352
I am new to Python and DB. Any suggestions would be appreciated. Thank you in advance!