-
-
Notifications
You must be signed in to change notification settings - Fork 18.4k
Series.reset_index(level_name, drop=True) accepts invalid name when index is flat #20925
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
Comments
Can I try to deal with this one as my first issue? |
Sure! Notice the following should also raise: In [2]: s = pd.Series(range(4), name='valid')
In [3]: s.reset_index(['valid', 'valid'], drop=True)
Out[3]:
0 0
1 1
2 2
3 3
Name: valid, dtype: int64 ... and bonus points if the following raises too (but leaving it aside for the moment is also fine): In [2]: s = pd.Series(range(4))
In [3]: s.reset_index([None, None])
Out[3]:
index 0
0 0 0
1 1 1
2 2 2
3 3 3 |
Hi, I'm a beginner and would like to contribute as my first bug fix. I'm not quite certain I understand the bug. Could you please explain? |
@rahulgo this bug is probably already being worked on by @misupova : I suggest you pick another one (still marked as good first issue ), possibly one for which you have a better understanding |
@misupova sorry, since this issue was open since some time I thought I'd give it a try. |
@KalyanGokhale an 11 days old bug is open "since some time"?! Have you seen the list?! @misupova ... hope you weren't already working on this, and that you can find another "good first issue" that suits you |
@toobaz I started working on that, but what’s done is done :) |
@misupova sincere apologies once again. @toobaz may be I was quick to jump on this one - but wanted to understand for future if there is any protocol you guys follow (e.g. if x # of days have passed and the person who signed up to work on an issue has not provided any update, then its fair play for someone else to pick it up etc?) - is there a middle ground between the time an issue is open and someone who has a (ready/near ready) solution can also post it....may be there is another collaborative way which I have not considered....just thinking out loud. Thanks! |
@KalyanGokhale no official protocol (we have so many bugs we don't typically fight over them ;-) ), and might depend on how urgent the issue is, but I guess a rule of thumb could be "always feel free to ask if the person who signed up to work on an issue is actually/still working on it, and if s/he isn't, or doesn't reply within a week, then feel free to steal it". (and in general, when you start working on an issue, always mention it) |
…das-dev#21016) closes pandas-dev#20925 (cherry picked from commit e033c06)
Code Sample, a copy-pastable example if possible
Problem description
In [3]:
should raise too.Expected Output
Same as
In [4]:
Output of
pd.show_versions()
INSTALLED VERSIONS
commit: None
python: 3.5.3.final.0
python-bits: 64
OS: Linux
OS-release: 4.9.0-6-amd64
machine: x86_64
processor:
byteorder: little
LC_ALL: None
LANG: it_IT.UTF-8
LOCALE: it_IT.UTF-8
pandas: 0.23.0.dev0+825.ga3facfc55
pytest: 3.5.0
pip: 9.0.1
setuptools: 39.0.1
Cython: 0.25.2
numpy: 1.14.1
scipy: 0.19.0
pyarrow: None
xarray: None
IPython: 6.2.1
sphinx: 1.5.6
patsy: 0.5.0
dateutil: 2.7.0
pytz: 2017.2
blosc: None
bottleneck: 1.2.0dev
tables: 3.3.0
numexpr: 2.6.1
feather: 0.3.1
matplotlib: 2.0.0
openpyxl: 2.3.0
xlrd: 1.0.0
xlwt: 1.3.0
xlsxwriter: 0.9.6
lxml: 4.1.1
bs4: 4.5.3
html5lib: 0.999999999
sqlalchemy: 1.0.15
pymysql: None
psycopg2: None
jinja2: 2.10
s3fs: None
fastparquet: None
pandas_gbq: None
pandas_datareader: 0.2.1
The text was updated successfully, but these errors were encountered: