Skip to content

pct_change() fails on series holding int64 #1788

Closed
@lodagro

Description

@lodagro
In [132]: df
Out[132]: 
    A   B
a  10   8
b  12  16
c  12  24

In [133]: df.dtypes
Out[133]: 
A    int64
B    int64

In [134]: df.pct_change()
Out[134]: 
     A    B
a  NaN  NaN
b  0.2  1.0
c  0.0  0.5

In [135]: df['A'].pct_change()
---------------------------------------------------------------------------
...
ValueError: Invalid dtype for padding

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions