Skip to content

Commit 6d77010

Browse files
authored
Merge branch 'master' into dataframeclient_chunked_queries
2 parents 9aad198 + 046b219 commit 6d77010

File tree

1 file changed

+3
-10
lines changed

1 file changed

+3
-10
lines changed

influxdb/_dataframe_client.py

Lines changed: 3 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -339,17 +339,10 @@ def _convert_dataframe_to_lines(self,
339339
tag_df = self._stringify_dataframe(
340340
tag_df, numeric_precision, datatype='tag')
341341

342-
# prepend tag keys
343-
tag_df = tag_df.apply(
344-
lambda s: s.apply(
345-
lambda v, l: l + '=' + v if v else None, l=s.name))
346-
347-
# join tags, but leave out None values
342+
# join preprendded tags, leaving None values out
348343
tags = tag_df.apply(
349-
lambda r: ','.join(r.dropna()), axis=1)
350-
351-
# prepend comma
352-
tags = tags.apply(lambda v: ',' + v if v else '')
344+
lambda s: [',' + s.name + '=' + v if v else '' for v in s])
345+
tags = tags.sum(axis=1)
353346

354347
del tag_df
355348
else:

0 commit comments

Comments
 (0)
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy