Hello Friends, I hope someone check my code and helping me on this issue.
I want to read from multiple text files (at least 4) sequentially and print their content on the screen
- First time not using Threading
- Measure the elapsed time in both cases multiple time and calculate the average
this my Code:
import pandas as pd
from datetime import datetime start_time = datetime.now() text1 = pd.read_csv('alice_in_wonderland.txt', delimiter = "\t")
print(text1)
text2 = pd.read_csv('On-Sunset-Highways-Thomas-D-Murph.txt', delimiter = "\t")
print(text2)
text3 = pd.read_csv('History-of-Texas-Lan-Bill-Allcorn.txt', delimiter = "\t")
print(text3)
text4 = pd.read_csv('A-Secret-of-the-Sea--T-W-Thomas.txt', delimiter = "\t")
print(text4)time_elapsed = datetime.now() - start_time print('Time elapsed (hh:mm:ss.ms) {}'.format(time_elapsed))
From Here I have an issue how I make a multithreading by python. I want to make a 4 threads to read from text files and print on the screen , Also I want to
- Measure the elapsed time multiple times.
- record the results.
- calculate the average time. Note: number of files = 4 text files.