Skip to content

axis param for pd.Panel doesn't work #15176

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
SnowWalkerJ opened this issue Jan 20, 2017 · 1 comment
Closed

axis param for pd.Panel doesn't work #15176

SnowWalkerJ opened this issue Jan 20, 2017 · 1 comment
Labels
Duplicate Report Duplicate issue or pull request Missing-data np.nan, pd.NaT, pd.NA, dropna, isnull, interpolate

Comments

@SnowWalkerJ
Copy link

Code Sample, a copy-pastable example if possible

import numpy as np
import pandas as pd
a = pd.Panel({"A":{"a":[1,2,3,4,5], "b":[10, 20, np.nan, 40, 50]})
a.ffill(axis=0)["A"]
a.ffill(axis=1)["A"]
a.ffill(axis=2)["A"]

Problem description

change to the param axis doesn't change the result. It all gives:

 a     b

0 1.0 10.0
1 2.0 20.0
2 3.0 20.0
3 4.0 40.0
4 5.0 50.0

Expected Output

 a     b

0 1.0 10.0
1 2.0 20.0
2 3.0 3.0
3 4.0 40.0
4 5.0 50.0

Output of pd.show_versions()

INSTALLED VERSIONS ------------------ commit: None python: 3.5.2.final.0 python-bits: 64 OS: Windows OS-release: 7 machine: AMD64 processor: Intel64 Family 6 Model 60 Stepping 3, GenuineIntel byteorder: little LC_ALL: None LANG: None LOCALE: None.None

pandas: 0.19.2
nose: 1.3.7
pip: 9.0.1
setuptools: 32.1.3
Cython: 0.25.2
numpy: 1.12.0
scipy: 0.18.1
statsmodels: 0.6.1
xarray: None
IPython: 5.1.0
sphinx: 1.4.6
patsy: 0.4.1
dateutil: 2.6.0
pytz: 2016.10
blosc: None
bottleneck: 1.1.0
tables: 3.2.2
numexpr: 2.6.1
matplotlib: 1.5.3
openpyxl: 2.3.2
xlrd: 1.0.0
xlwt: 1.1.2
xlsxwriter: 0.9.3
lxml: 3.6.4
bs4: 4.5.1
html5lib: None
httplib2: None
apiclient: None
sqlalchemy: 1.0.13
pymysql: 0.7.9.None
psycopg2: None
jinja2: 2.8
boto: 2.42.0
pandas_datareader: None

@jreback
Copy link
Contributor

jreback commented Jan 20, 2017

dupe of #8251

@jreback jreback closed this as completed Jan 20, 2017
@jreback jreback added Duplicate Report Duplicate issue or pull request Missing-data np.nan, pd.NaT, pd.NA, dropna, isnull, interpolate Panel labels Jan 20, 2017
@jreback jreback added this to the No action milestone Jan 20, 2017
@jreback jreback modified the milestones: No action, won't fix Jul 11, 2017
@TomAugspurger TomAugspurger modified the milestones: won't fix, No action Jul 6, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Duplicate Report Duplicate issue or pull request Missing-data np.nan, pd.NaT, pd.NA, dropna, isnull, interpolate
Projects
None yet
Development

No branches or pull requests

3 participants