pandarallel
pandarallel copied to clipboard
how to use it in fastapi
I have a server like:
from fastapi import FastAPI
from pandarallel import pandarallel
pandarallel.initialize()
app = FastAPI()
@app.post("/area_quant")
def create_item(event_data: Areadata):
data = pd.DataFrame(event_data.data)
data['type_score'] = data['EVENT_TYPE'].applymap(Config.type_map)
if __name__ == '__main__':
uvicorn.run(app)
as a server,it can only run one time,then it will shutdown,how can i use it in a server?
bump: I am also facing similar issue
Pandaral·lel is looking for a maintainer! If you are interested, please open an GitHub issue.
bump: I am also facing similar issue
+1,May I ask if you have resolved or identified the cause of the problem