Skip to content
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.

Can not work, issue show KeyError: '[0] not in index', need your great help .thanks. #497

@leonyan1314

Description

@leonyan1314

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'

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions

      pFad - Phonifier reborn

      Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

      Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


      Alternative Proxies:

      Alternative Proxy

      pFad Proxy

      pFad v3 Proxy

      pFad v4 Proxy