'Dataframe to Influxdb -- ValueError: The truth value of a DataFrame is ambiguous
I'm trying to write a simple dataframe into influx and this are my columns:
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().
Does anyone know what is wrong?
Sources
This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.
Source: Stack Overflow
| Solution | Source |
|---|
