Skip to content

Panel.ffill ignores axis parameter and fill along axis=1 #14499

@Tux1

Description

@Tux1

A small, complete example of the issue

a = pd.Panel({'a':np.arange(15).reshape((5,3)), 'b':np.arange(15,30).reshape((5,3))})
a['a'].loc[1,1] = np.nan

a['a']
Out[36]:
    0     1   2
0   0   1.0   2
1   3   NaN   5
2   6   7.0   8
3   9  10.0  11
4  12  13.0  14

a.ffill(axis=2)['a']
Out[38]:
      0     1     2
0   0.0   1.0   2.0
1   3.0   1.0   5.0
2   6.0   7.0   8.0
3   9.0  10.0  11.0
4  12.0  13.0  14.0

Expected Output

a.at['a', 1, 1] == 3
If you ffill along axis=2, you should get 3 instead of 1

Output of pd.show_versions()

Pandas 0.19.0

Metadata

Metadata

Assignees

No one assigned

    Labels

    BugDuplicate ReportDuplicate issue or pull requestMissing-datanp.nan, pd.NaT, pd.NA, dropna, isnull, interpolate

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions