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.

'Index' object has no attribute 'tzinfo' #696

Open
@h4nz11

Description

@h4nz11

Hello,
I've tried to update pandas to the latest version and make this query
SELECT mean(value) FROM data WHERE time >= '2018-10-01' AND time < '2019-02-01' GROUP BY time(1d) tz('Europe/Prague')
but if I hit time period withnout any data, I will get this error

influxdb/_dataframe_client.pyc in _to_dataframe(self, rs, dropna)
    203             df.time = pd.to_datetime(df.time)
    204             df.set_index('time', inplace=True)
--> 205             if df.index.tzinfo is None:
    206                 df.index = df.index.tz_localize('UTC')
    207             df.index.name = None

AttributeError: 'Index' object has no attribute 'tzinfo'

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