Skip to content

PERF: avoid copies where possible #17449

Closed
@jreback

Description

@jreback

This copies 3 times (even with the default copy=False)

In [2]: i = pd.date_range('20170101', periods=3, tz='US/Eastern')
In [3]: pd.Series(i)
Out[3]: 
0   2017-01-01 00:00:00-05:00
1   2017-01-02 00:00:00-05:00
2   2017-01-03 00:00:00-05:00
dtype: datetime64[ns, US/Eastern]

In theory we could get this to 0 copy (this is already correctly dtyped, so needs no conversion).

Metadata

Metadata

Assignees

No one assigned

    Labels

    PerformanceMemory or execution speed performanceReshapingConcat, Merge/Join, Stack/Unstack, ExplodeTimezonesTimezone data dtype

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions