Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings
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

Copy link
Copy link
Open
@Karan-M-Shah

Description

@Karan-M-Shah
Issue body actions

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

      Morty Proxy This is a proxified and sanitized view of the page, visit original site.