This repository was archived by the owner on Oct 29, 2024. It is now read-only.
This repository was archived by the owner on Oct 29, 2024. It is now read-only.
DataFrame write "nan", "inf" error in influxdb #422
Closed
Description
see here #195
It seems that in the latest version, if a DataFrame contains nan, inf elements, there will be error when writing to influxdb. The problem is that the line protocol doesn't support "value1=nan" or "value1=inf". You can drop rows containing nan using df.dropna(), but in most of the case, in the same row, you will need to keep those values that are not "nan", so droping an entire row is not ideal. The solution can be to omit the value fields that is "nan" and "inf" (np.isfinite()), something like, changing "value1=0.3, value2=nan, value3=inf" to "value1=0.3". In this way, the influxdb will keep value1, and give value2, and value3 empty values.
Metadata
Metadata
Assignees
Labels
No labels