Skip to content

Strange behavior of Series/TimeSeries with datetime index #758

@soramame0518

Description

@soramame0518

I had a trouble with Series and TimeSeries using datetime index. Here is an example:

In [1]: from pandas import *

In [2]: t = [datetime(2012, 2, 7, 0, 0, 0), datetime(2012, 2, 7, 23, 0, 0)]

In [3]: s = Series([0, 1], index=t)

In [4]: print s
2012-02-07 0
2012-02-07 00:00:00 1

The first index value should be '2012-02-07 00:00:00', and the second should be '2012-02-07 23:00:00' Am I doing wrong?

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions