You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
PS C:\Users\zenzxjul> python value_error.py
<bound method NDFrame.head of result table _time _start _stop _measurement test_double test_long
0 _result 02023-12-1513:19:55.372000+00:002023-12-1513:19:54+00:002023-12-1513:19:57+00:00 test 4.0 NaN
1 _result 02023-12-1513:19:56+00:002023-12-1513:19:54+00:002023-12-1513:19:57+00:00 test NaN 1.0>
Actual behavior
PS C:\Users\zenzxjul> python value_error.py
Traceback (most recent call last):
File "C:\Users\zenzxjul\value_error.py", line 20,in<module>
df = query_api.query_data_frame(org=org, query=flux_query)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "C:\Users\zenzxjul\AppData\Local\Programs\Python\Python311\Lib\site-packages\influxdb_client\client\query_api.py", line 254,in query_data_frame
return self._to_data_frames(_generator)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "C:\Users\zenzxjul\AppData\Local\Programs\Python\Python311\Lib\site-packages\influxdb_client\client\_base.py", line 318,in _to_data_frames
_dataFrames = list(_generator)
^^^^^^^^^^^^^^^^
File "C:\Users\zenzxjul\AppData\Local\Programs\Python\Python311\Lib\site-packages\influxdb_client\client\flux_csv_parser.py", line 115,in generator
for val in parser._parse_flux_response():
File "C:\Users\zenzxjul\AppData\Local\Programs\Python\Python311\Lib\site-packages\influxdb_client\client\flux_csv_parser.py", line 126,in _parse_flux_response
for val in self._parse_flux_response_row(metadata, csv):
File "C:\Users\zenzxjul\AppData\Local\Programs\Python\Python311\Lib\site-packages\influxdb_client\client\flux_csv_parser.py", line 228,in _parse_flux_response_row
flux_record = self.parse_record(metadata.table_index -1, metadata.table, csv)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "C:\Users\zenzxjul\AppData\Local\Programs\Python\Python311\Lib\site-packages\influxdb_client\client\flux_csv_parser.py", line 265,in parse_record
record.values[column_name] = self._to_value(str_val, fluxColumn)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "C:\Users\zenzxjul\AppData\Local\Programs\Python\Python311\Lib\site-packages\influxdb_client\client\flux_csv_parser.py", line 277,in _to_value
return self._to_value(np.nan, column)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "C:\Users\zenzxjul\AppData\Local\Programs\Python\Python311\Lib\site-packages\influxdb_client\client\flux_csv_parser.py", line 289,in _to_value
return int(str_val)
^^^^^^^^^^^^
ValueError: cannot convert float NaN to integer
Specifications
Code sample to reproduce problem
Expected behavior
Print the head of the table like:
Actual behavior
Additional info
Minimal csv data to reproduce:
The text was updated successfully, but these errors were encountered: