Skip to content

Commit 24a423a

Browse files
authored
Change back to returning a df with same index
1 parent add7189 commit 24a423a

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
@@ -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)