Skip to content

String column changed in DataFrame Write #153

Closed
@josefmtd

Description

@josefmtd

Steps to reproduce:
List the minimal actions needed to reproduce the behavior.

  1. Create a dataframe that has a string column with space or comma
  2. Write the dataframe to an InfluxDB measurement
  3. An escape ('\') is added before every spaces (and/or) comma

in code:

now = datetime.datetime.now()
an_hour_ago = now - datetime.timedelta(hours = 1)

test = [{'a': an_hour_ago, 'b': 'hello world', 'c': 1}, 
        {'a': now, 'b': 'goodbye cruel world', 'c': 2}]

df_test = pandas.DataFrame(test)
df_test = df_test.set_index('a')

upload_data(df_test, 'test', []) # some wrapper function

Expected behavior:

select * from test
name: test
time b c


1599921346848720000 hello world 1
1599924946848720000 goodbye cruel world 2

Actual behavior:
Describe What actually happened.

> select * from test
name: test
time                b                     c
----                -                     -
1599921346848720000 hello\ world          1
1599924946848720000 goodbye\ cruel\ world 2

Specifications:

  • Client Version: 1.10.0
  • InfluxDB Version: 1.8.2
  • Platform: Python Client API on Anaconda 3 Windows 10, InfluxDB running on Docker inside Ubuntu 20.04 VM (x64)

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions