Skip to content

BUG: pd.testing.makeMultiIndex ignores k parameter #38795

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
3 tasks done
ivirshup opened this issue Dec 30, 2020 · 5 comments · Fixed by #45305
Closed
3 tasks done

BUG: pd.testing.makeMultiIndex ignores k parameter #38795

ivirshup opened this issue Dec 30, 2020 · 5 comments · Fixed by #45305
Assignees
Labels
Bug good first issue Testing pandas testing functions or related to the test suite
Milestone

Comments

@ivirshup
Copy link
Contributor

  • I have checked that this issue has not already been reported.

  • I have confirmed this bug exists on the latest version of pandas.

  • (optional) I have confirmed this bug exists on the master branch of pandas.


Code Sample, a copy-pastable example

assert len(pd.testing.makeMultiIndex(k=10)) == 4

def makeMultiIndex(k=10, names=None, **kwargs):
return MultiIndex.from_product((("foo", "bar"), (1, 2)), names=names, **kwargs)

Problem description

All other testing.make*Index methods take a parameter k which lets you specify the length. makeMultiIndex explicitly takes this parameter but does nothing with it.

Expected Output

assert len(pd.testing.makeMultiIndex(k=10)) == 10
@ivirshup ivirshup added Bug Needs Triage Issue that has not been reviewed by a pandas team member labels Dec 30, 2020
@simonjayhawkins simonjayhawkins added Testing pandas testing functions or related to the test suite and removed Bug Needs Triage Issue that has not been reviewed by a pandas team member labels Dec 31, 2020
@ShashankR87
Copy link

Hey, I would like to contribute to solving this issue. This would be my first contribution.
Could you please provide some more info about the issue and what is supposed to happen?

@ShreyasPatel031
Copy link

take

@RaphaelAzev
Copy link

@ShreyasPatel031 Are you still working on this? I would like to contribute if aswell if possible

@bobquest33
Copy link

This ticket is still open if this is fixed, should it not be closed

@jreback
Copy link
Contributor

jreback commented Dec 12, 2021

this is not fixed
PRs were closed as stale

@jreback jreback added this to the 1.5 milestone Jan 11, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Bug good first issue Testing pandas testing functions or related to the test suite
Projects
None yet
8 participants