Skip to content

Commit cd01183

Browse files
committed
fix: Fixed serialization of DataFrame with empty (NaN) values #118
1 parent a014150 commit cd01183

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

influxdb_client/client/write/dataframe_serializer.py

+2-2
Original file line numberDiff line numberDiff line change
@@ -83,7 +83,7 @@ def data_frame_to_list_of_points(data_frame, point_settings, **kwargs):
8383
tags.sort(key=lambda x: x['key'])
8484
tags = ','.join(map(lambda y: y['value'], tags))
8585

86-
fmt = (f'{{measurement_name}}', f'{"," if tags else ""}', tags,
86+
fmt = ('{measurement_name}', f'{"," if tags else ""}', tags,
8787
' ', ','.join(fields), ' {p[0].value}')
8888
f = eval("lambda p: f'{}'".format(''.join(fmt)),
8989
{'measurement_name': measurement_name, '_ESCAPE_KEY': _ESCAPE_KEY, 'keys': keys})
@@ -100,4 +100,4 @@ def data_frame_to_list_of_points(data_frame, point_settings, **kwargs):
100100
for p in _itertuples(data_frame))
101101
return list(lp)
102102
else:
103-
return list(map(f, _itertuples(data_frame)))
103+
return list(map(f, _itertuples(data_frame)))

0 commit comments

Comments
 (0)