Skip to content

Commit bcac807

Browse files
committed
fix already tz-aware error
1 parent d370895 commit bcac807

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

influxdb/_dataframe_client.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -202,7 +202,8 @@ def _to_dataframe(self, rs, dropna=True):
202202
df = pd.DataFrame(data)
203203
df.time = pd.to_datetime(df.time)
204204
df.set_index('time', inplace=True)
205-
df.index = df.index.tz_localize('UTC')
205+
if df.index.tzinfo is None:
206+
df.index = df.index.tz_localize('UTC')
206207
df.index.name = None
207208
result[key].append(df)
208209
for key, data in result.items():

0 commit comments

Comments
 (0)
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