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
Description
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?