I have previously been using influxdb version 1
Tested the version 2.0 beta and am having zero luck batch writing a pandas dataframe at speed
This is what I am following. Converting to line protocol seems to be a very expensive step that is taking a very long time:
lines= [str(df[measurement][d]) + “,”
+ str(tag_key) + “=” + str(df[tag_key][d])
+ " " + str(df[field][d]) + “=” + str(df[value][d])
+ " " + str(int(time.mktime(df[datetime][d].timetuple()))) + “000000000” for d in range(len(df))]
This doesn’t feel right to be honest - I have big dataframes I need to write to influxdb. Can someone show me some example code for how to do this?