We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
This is not a serious issue, but the list of stubnames passed into wide_to_long is modified by the function call.
wide_to_long
commit: None python: 2.7.6.final.0 python-bits: 64 OS: Linux OS-release: 3.13.0-43-generic machine: x86_64 processor: x86_64 byteorder: little LC_ALL: None LANG: en_US.UTF-8
pandas: 0.15.1 nose: 1.3.1 Cython: None numpy: 1.9.1 scipy: 0.14.0 statsmodels: 0.5.0 IPython: 1.2.1 sphinx: 1.2.2 patsy: 0.2.1 dateutil: 2.3 pytz: 2014.10 bottleneck: None tables: None numexpr: 2.2.2 matplotlib: 1.3.1 openpyxl: 1.7.0 xlrd: 0.9.2 xlwt: 0.7.5 xlsxwriter: None lxml: 3.3.3 bs4: 4.2.1 html5lib: 0.999 httplib2: 0.8 apiclient: None rpy2: 2.5.2 sqlalchemy: None pymysql: None psycopg2: None
>>> import pandas as pd >>> df = pd.DataFrame([[0,1,2,3,8],[4,5,6,7,9]]) >>> df.columns = ['id', 'inc1', 'inc2', 'edu1', 'edu2'] >>> df id inc1 inc2 edu1 edu2 0 0 1 2 3 8 1 4 5 6 7 9 >>> stubs = ['inc', 'edu'] >>> df_long = pd.wide_to_long(df, stubs, i='id', j='age') >>> df_long inc edu id age 0 1 1 3 4 1 5 7 0 2 2 8 4 2 6 9 >>> stubs ['edu']
The text was updated successfully, but these errors were encountered:
Thanks for the report! I reproduced this with 0.15.2.
If you're feeling up for it, would love to get a PR with a fix. Should be pretty simple, I think.
Sorry, something went wrong.
Sure, I can do this. I'll submit by the end of this week.
closed by #9215
Successfully merging a pull request may close this issue.
This is not a serious issue, but the list of stubnames passed into
wide_to_long
is modified by the function call.INSTALLED VERSIONS
commit: None
python: 2.7.6.final.0
python-bits: 64
OS: Linux
OS-release: 3.13.0-43-generic
machine: x86_64
processor: x86_64
byteorder: little
LC_ALL: None
LANG: en_US.UTF-8
pandas: 0.15.1
nose: 1.3.1
Cython: None
numpy: 1.9.1
scipy: 0.14.0
statsmodels: 0.5.0
IPython: 1.2.1
sphinx: 1.2.2
patsy: 0.2.1
dateutil: 2.3
pytz: 2014.10
bottleneck: None
tables: None
numexpr: 2.2.2
matplotlib: 1.3.1
openpyxl: 1.7.0
xlrd: 0.9.2
xlwt: 0.7.5
xlsxwriter: None
lxml: 3.3.3
bs4: 4.2.1
html5lib: 0.999
httplib2: 0.8
apiclient: None
rpy2: 2.5.2
sqlalchemy: None
pymysql: None
psycopg2: None
The text was updated successfully, but these errors were encountered: