gusutabopb/aioinflux

Chunked reponse to DataFrame

Closed this issue · 2 comments

First of, thank you! Great repo with excellent documentation. I use it with a Starlette project I am working on.

In the project I've implemented a simple way to parse a pandas.Dataframe from a chuncked response. It works, and I added it to my fork and I am wondering if you would welcome such a feature.

Here is the MVP implementation in my fork

I'll clean the code, remove exceptions, move it to serialization/dataframe.py and add tests if you're OK with it.

Hi, I am glad you find this library useful.

I am not quite sure why I left this functionality unimplemented but since it seemed rather trivial, I just implemented it on the last few commits (mostly this one: e3c2a0b).

With this implementation approach, there was no need to touch serialization/dataframe.py. The chunks are serialized one by one and can be later concatenated on user code using pd.concat. See the updated docs for some more concrete examples: https://github.com/gusutabopb/aioinflux/blob/master/docs/usage.rst#chunked-responses

I will make a release containing this feature shortly, but in the mean time please see if you find this useful with the code available on the master branch.

Great solution!! I'll update my dependencies and implement it in my file! I'll let you know it any bugs show up, but I'd consider it closed.

Thank you!