You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Here is a solution that I thought of. Runs in 5.5 seconds on my machine:
import glob
import time
start = time.time()
path = "../data/"
all_files = glob.glob(path + "/*.csv")
cols = ["f_0", "f_1", "f_2", "f_3", "f_4", "f_5", "f_6", "f_7", "f_8", "f_9", "target"]
with open("out.csv", "w") as out:
out.write("%s\n" % ",".join(cols))
for filename in all_files:
with open(filename) as f:
for idx, line in enumerate(f):
if idx > 0:
out.write(line)
end = time.time()
print(end - start)
The text was updated successfully, but these errors were encountered:
Could you (@abhishekkrthakur ) please provide your machine configuration?
Because it is taking 124.09613084793091 s on my machine.
My machine configuration:
MacBook Pro (15-inch, 2019)
2.3 GHz Intel Core i9
16 GB 2400 MHz DDR4
Radeon Pro 560X 4 GB
Intel UHD Graphics 630 1536 MB
Here is a solution that I thought of. Runs in 5.5 seconds on my machine:
The text was updated successfully, but these errors were encountered: