Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings
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.

FutureWarning on frame.append method #920

Open
@lothesven

Description

@lothesven
  • InfluxDB version: e.g. 1.7.7 (output of theinflux version command)
  • InfluxDB-python version: e.g. 5.2.2 (output of thepython -c "from __future__ import print_function; import influxdb; print(influxdb.__version__)" command)
  • Python version: e.g. 3.7.4 (output of thepython --version command)
  • Operating system version: e.g. Windows 10, Ubuntu 18.04, macOS 10.14.5

Here is the code:

`client = influxdb_client.InfluxDBClient( url = self.url,
token = self.token,
org = self.org,
timeout = self.timeout,
verify_ssl=False)

query_api = client.query_api()

now = dt.datetime.now(tz=dt.timezone.utc)
stringTimeStart = now - dt.timedelta(minutes=1)
stringTimeStart = stringTimeStart.replace(second=0, microsecond=0)
stringTimeStop = now # - dt.timedelta(hours=0)
stringTimeStop = stringTimeStop.replace(second=0, microsecond=0)

query = '''
from(bucket: "my-bucket")
|> range(start: {stringTimeStart}, stop: {stringTimeStop})
|> filter(fn: (r) => r["_measurement"] == "MeasureName")
|> filter(fn: (r) => r["_field"] == "xDef" or r["_field"] == "xDef1" or r["_field"] == "xDef2" or r["_field"] == "xDef3")
|> keep(columns: ["_time", "_field", "_value"])
|> pivot(rowKey:["_time"], columnKey: ["_field"], valueColumn: "_value")
'''

query = query.format(stringTimeStart=stringTimeStart.isoformat(), stringTimeStop=stringTimeStop.isoformat())
self.last_states = query_api.query_data_frame(query = query)`

Here is the problematic output message :

/home/user/.local/lib/python3.9/site-packages/influxdb_client/client/flux_csv_parser.py:191: FutureWarning: The frame.append method is deprecated and will be removed from pandas in a future version. Use pandas.concat instead. return self._data_frame.append(_temp_df)

The script is working properly for now but I am afraid it could be disrupted in the future.

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


      [8]ページ先頭

      ©2009-2025 Movatter.jp