Skip to content

Commit e0abebb

Browse files
committed
fix: regexp for remove leading comma for NaN values
1 parent 0e3c683 commit e0abebb

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
@@ -160,9 +160,9 @@ def __init__(self, data_frame, point_settings, precision=DEFAULT_WRITE_PRECISION
160160
# This column is a tag column.
161161
if null_columns[index]:
162162
key_value = f"""{{
163-
'' if {val_format} == '' or type({val_format}) == float and math.isnan({val_format}) else
163+
'{_EMPTY_EXPRESSION}' if {val_format} == '' or type({val_format}) == float and math.isnan({val_format}) else
164164
f',{key_format}={{str({val_format}).translate(_ESCAPE_STRING)}}'
165-
}}"""
165+
}}""" # noqa: E501
166166
else:
167167
key_value = f',{key_format}={{str({val_format}).translate(_ESCAPE_KEY)}}'
168168
tags.append(key_value)

0 commit comments

Comments
 (0)