I have csv file data. and I want to convert that csv file data either directly to excel file(.xls or .xlsx) or by reading csv file data and write to excel file. at the end format should be in correct...means number types should be in number,date should be in date format.
I have used below code to do the above task. but the numbers are coming as string only.
import pandas as pd
import numpy as np
msft = pd.read_csv("input.csv")
df = msft.head(n=3000)
df.to_excel("output.xls", index=None, header=None)
name rollno marks doj xxx 100 99 15-Jul-16 yyy 200 90 10-Feb-17
Can anyone please help on this.
Thanks in advance...