I need to generate 3000+ ndjson files from a pandas data frame based on certain criteria. I tried running the following code, it works but it takes a lot of time to finish.<