Skip to content

Commit 70479bd

Browse files
alanbatojreback
authored andcommitted
Change back to returning a df with same index
1 parent ae8323b commit 70479bd

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

pandas/core/reshape/pivot.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -455,7 +455,7 @@ def crosstab(index, columns, values=None, rownames=None, colnames=None,
455455
from pandas import DataFrame
456456
df = DataFrame(data, index=common_idx)
457457
if not len(df):
458-
return DataFrame(index=common_idx)
458+
return df
459459
if values is None:
460460
df['__dummy__'] = 0
461461
kwargs = {'aggfunc': len, 'fill_value': 0}

0 commit comments

Comments
 (0)