Thanks to visit codestin.com
Credit goes to github.com

Skip to content
This repository was archived by the owner on Oct 29, 2024. It is now read-only.
This repository was archived by the owner on Oct 29, 2024. It is now read-only.

Writing a Dataframe to InfluxDB: ValueError #787

Open
@Karan-M-Shah

Description

@Karan-M-Shah

I'm trying to write a simple dataframe into influx:

Index Tag 1 Field 1 Field 2

I have checked various documentation, tried a number of "solutions" but I continue to get errors.

data_frame['index'] = pd.to_datetime(data_frame['index'])
data_frame = data_frame.set_index('index')
client.write_points(data_frame, 'measurement', tags = { 'ID': data_frame[['ID']] })

I get the following error:
ValueError: The truth value of a DataFrame is ambiguous. Use a.empty, a.bool(), a.item(), a.any() or a.all().

Anyone know of a solution?

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions