I am using a dataset of 60,000. Which is taking 6.4 seconds to read the xlsx file and then convert it into a CSV. How to reduce the time? My code :
import pandas as pd
import time
def read_xlsx(path):
df = pd.read_excel(path)
return df
def convert_to_csv(df):
df.to_csv('orders_csv_file.csv')
if __name__ == '__main__':
start = time.clock()
df = read_xlsx("/home/arima/sublime_workspace/orders.xlsx")
print(time.clock() - start)
start = time.clock()
convert_to_csv(df)
print(time.clock() - start)
Time taken for reading the excel is high(6 sec), converting it into csv taking(.30) sec.