-
Notifications
You must be signed in to change notification settings - Fork 524
Drop pandas DataFrame NaN values for json protocol #587
Conversation
for ts, tag, rec in zip(dataframe.index, | ||
dataframe[tag_columns].to_dict('record'), | ||
dataframe[field_columns].to_dict('record')) | ||
for ts, tag, rec in dataframe_zip |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Got an error when all fields contain NaN values. I changed this to
for ts, tag, rec in dataframe_zip if any(rec)
to skip the points with all empty fields.
@tux-00 would you mind adding a test to check that NaNs are handled properly? |
Yes, when I have time to do it ! I keep this PR in mind. |
Hey, I need help with tests. I added the test but I have a problem with the numpy package: Why the first build says that no numpy module is present ? I tried to add numpy definition in test-requirements.txt but numpy seems to be imported by tox.ini Can anyone help me with the numpy module import ? |
The test is OK with 2.7 and 3.6 but with 3.5 I got a strange error "Plugin 'travis' could not be loaded". |
Hey, can someone take a look at the CI error ? I need some help here. |
Did you rebase on master recently? AFAIK some CI issues were fixed there. |
* Unpin setuptools to fix travis Signed-off-by: Matthew McGinn <[email protected]> * Add some ignores for new flake8 tests Signed-off-by: Matthew McGinn <[email protected]>
cryptography-2.5 is not compatible with PyPy < 5.4
…a#689) Signed-off-by: Matthew McGinn <[email protected]>
Signed-off-by: Matthew McGinn <[email protected]>
* fix already tz-aware error * fix tests tz_localize * update CHANGELOG.md
Signed-off-by: Matthew McGinn <[email protected]>
* add py37 and recent influxdb * remove useless py34 dep * use py36 for pydocstyle (py27 soon deprecated) * ugly fix to numpy inconsistencies * py37 is not in ubuntu 14.04 * move import numpy and add noqa * get 3.7 into travis matrix * get 3.7 into travis matrix
* numpy might use non-numerical version * update * update CHANGELOG.md
Signed-off-by: Matthew McGinn <[email protected]>
* add bind_params to query * tutorial for bind_params
* Add CQs management methods to the client
* Fix a warning under Python 3.7 Signed-off-by: Matthew McGinn <[email protected]>
…influxdata#699) Closes influxdata#666 Signed-off-by: Matthew McGinn <[email protected]>
* add consistency parameter to write_points [influxdata#643]
Due to lack of documentation for UDP, this example provides basic usage of sending information points via UDP. The code structure followed is similar, if not same as other examples in the `examples` directory. Signed-off-by: Shantanoo <[email protected]>
Is the rebase good ? Maybe I did something bad again. |
Can anyone merge this PR ? |
Is there someone here ? |
I'll look at this when I have time, sorry for the delay. Maybe someone else from the team will have time before me. |
These changes were addressed in #812 , closing for now. |
This PR drop NaN values when converting df to dict in json protocol. I removed staticmethod decorator from _convert_dataframe_to_json to use a new static method.
Related to #422, #576, #436