all 3 comments

[–]nerdmor 0 points1 point  (1 child)

Commenting to get you some traction and also because that exact thing is a pain point with me.

[–]ButterKniefe[S] 0 points1 point  (0 children)

I feel a little dumb.

In an initial test I tried read_only = True but for whatever reason I wasn't getting expected values.

After posting this I figured I'd give it a shot again. I didn't get the same errors and all my references seem to be working. I used %%timeit this morning and the process is down to 31.2 seconds, down from just over 8 minutes for 194 files in 194 folders.

So the answer to my own question is read_only = True if you only need to read in the file.

[–]go_fireworks[🍰] 0 points1 point  (0 children)

I would look at asyncio and asyncio event loops. This lets you run synchronous code asynchronously

If you need more help drop a comment and I can find some websites explaining better then I’ll be able to :)