Skip to content

Commit 611bcb3

Browse files
committed
refactor(dataframe): avoid chained assignment in replace operation
1 parent 7a5f655 commit 611bcb3

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

influxdb_client/client/write/dataframe_serializer.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -234,7 +234,7 @@ def __init__(self, data_frame, point_settings, precision=DEFAULT_WRITE_PRECISION
234234

235235
for k, v in dict(data_frame.dtypes).items():
236236
if k in data_frame_tag_columns:
237-
data_frame[k].replace('', np.nan, inplace=True)
237+
data_frame.replace({k: ''}, np.nan, inplace=True)
238238

239239
self.data_frame = data_frame
240240
self.f = f

0 commit comments

Comments
 (0)