I am trying to see how I can check the time taken by python to write the data inside a csv file. Here is a sample code that I am trying to work:
import timeit
start_time = timeit.default_timer()
df_text.to_csv('D:\\DF.csv', index = False)
print(timeit.default_timer() - start_time)
More specifically, How can I see the write time taken by df_text to fill in the data inside DF.csv? I believe this code (in 3rd) tells me the time taken to create the CSV file inside the directory.