Skip to content

Commit bb03a53

Browse files
committed
BUG: Do not interpret tuple names are MultiIndex keys
closes pandas-dev#18321
1 parent c271d4d commit bb03a53

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

pandas/core/reshape/pivot.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -454,7 +454,7 @@ def crosstab(index, columns, values=None, rownames=None, colnames=None,
454454
raise ValueError("values cannot be used without an aggfunc.")
455455

456456
from pandas import DataFrame
457-
df = DataFrame(data, index=common_idx)
457+
df = DataFrame(data, index=common_idx, columns=list(data))
458458
if values is None:
459459
df['__dummy__'] = 0
460460
kwargs = {'aggfunc': len, 'fill_value': 0}

0 commit comments

Comments
 (0)