Skip to content

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

Closed
@ivirshup

Description

@ivirshup
  • 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

Metadata

Metadata

Labels

BugTestingpandas testing functions or related to the test suitegood first issue

Type

No type

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions