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 }}
Repository navigation
Pandas outputs warning when calling dataframe.append in flux_csv_parser._prepare_data_frame #613
/usr/local/lib/python3.11/site-packages/influxdb_client/client/flux_csv_parser.py:256: FutureWarning:
The behavior of array concatenation with empty entries is deprecated. In a future version, this will no longer exclude empty items when determining the result dtype. To retain the old behavior, exclude the empty entries before the concat operation.
In the recent pandas version handling of concatenation of empty dataframes changed, see pandas-dev/pandas#39122. This should be handled else wise to reflect the changes in pandas.
I wasn't able to replicate this issue. I have tried to run this with 2.0.3 and 2.1.1 pandas with no warning.
Could you provide more information (query, data etc.) ?
WARNING warnings C:\my_project\venv\Lib\site-packages\influxdb_client\client\flux_csv_parser.py:258: FutureWarning:
The behavior of array concatenation with empty entries is deprecated. In a future version, this will no longer exclude empty items when determining the result dtype. To retain the old behavior, exclude the empty entries before the concat operation.
I see
>>> df.equals(_temp_df)
True
so possible solution can look like
if self._data_frame.empty:
df = _temp_df
else:
df = pd.concat([self._data_frame.astype(_temp_df.dtypes), _temp_df])
but I'm not sure about consequences across all codes
Activity
Sciator commentedon Oct 26, 2023
I wasn't able to replicate this issue. I have tried to run this with
2.0.3and2.1.1pandas with no warning.Could you provide more information (query, data etc.) ?
bednar commentedon Oct 26, 2023
ivankudibal commentedon Nov 21, 2023
pls, it would be great if we have data and the query to reproduce, before we can go on with this issue
oskarwilliams commentedon Oct 11, 2024
I am seeing this issue as well, do you still need a query to repro this?
bednar commentedon Oct 11, 2024
Hi @oskarwilliams, the query and possibly an example of your data in the database would be helpful… Thanks.
dave-cz commentedon Nov 7, 2024
Python 3.12
Pandas 2.2.3
InfluxDB 2.7.5
influxdb_client 1.47.0
Query results from InfluxDB Data Explorer
query(1).csv
Code:
query_api.query_data_frame(query, data_frame_index=['time'])query:
flux_csv_parser.py l.258
df = pd.concat([self._data_frame.astype(_temp_df.dtypes), _temp_df])_temp_df.to_csv('temp_df.csv')temp_df.csv
I see
so possible solution can look like
but I'm not sure about consequences across all codes
djhoese commentedon Jul 23, 2025
Any updates on this? I'm also seeing this, but it looks like the last comment provided detailed information.