You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository was archived by the owner on Oct 29, 2024. It is now read-only.
Create pandas DataFrame
Create database: demo
Write DataFrame
Traceback (most recent call last):
File "/Users/LeonYan/MyPython/QI/DF2influx.py", line 50, in
main(host=args.host, port=args.port)
File "/Users/LeonYan/MyPython/QI/DF2influx.py", line 25, in main
client.write_points(df, 'demo', protocol=protocol)
File "/Users/LeonYan/Library/Python/2.7/lib/python/site-packages/influxdb/_dataframe_client.py", line 125, in write_points
field_columns=field_columns)
File "/Users/LeonYan/Library/Python/2.7/lib/python/site-packages/influxdb/_dataframe_client.py", line 220, in _convert_dataframe_to_json
dataframe[field_columns].to_dict('record'))
File "/Users/LeonYan/Library/Python/2.7/lib/python/site-packages/pandas/core/frame.py", line 1958, in getitem
return self._getitem_array(key)
File "/Users/LeonYan/Library/Python/2.7/lib/python/site-packages/pandas/core/frame.py", line 2002, in _getitem_array
indexer = self.loc._convert_to_indexer(key, axis=1)
File "/Users/LeonYan/Library/Python/2.7/lib/python/site-packages/pandas/core/indexing.py", line 1231, in _convert_to_indexer
raise KeyError('%s not in index' % objarr[mask])
KeyError: '[0] not in index'