Skip to content Skip to sidebar Skip to footer

Can I Use Python Asyncio To Slice And Save Dataframe In A Loop?

As the title says - is it possible to write an asyncio event loop that will slice DataFrame by unique values in a certain column and save it on my drive? And maybe more importantly

Solution 1:

As far as I know there is no asyncio support as such in Pandas. I think the single-threaded event-based architecture is not the best tool in the systems where you have a dozens of other options to work with load/large data ie. for a large dataset take a look on dask.

The error you get is because you tried to await function Dataframe.to_csv that does not return Future (or any other awaitable object), but the None.

Post a Comment for "Can I Use Python Asyncio To Slice And Save Dataframe In A Loop?"