Skip to content

Commit

Permalink
Change back to returning a df with same index
Browse files Browse the repository at this point in the history
  • Loading branch information
alanbato authored Oct 5, 2017
1 parent add7189 commit 24a423a
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion pandas/core/reshape/pivot.py
Original file line number Diff line number Diff line change
Expand Up @@ -455,7 +455,7 @@ def crosstab(index, columns, values=None, rownames=None, colnames=None,
from pandas import DataFrame
df = DataFrame(data, index=common_idx)
if not len(df):
return DataFrame(index=common_idx)
return df
if values is None:
df['__dummy__'] = 0
kwargs = {'aggfunc': len, 'fill_value': 0}
Expand Down

0 comments on commit 24a423a

Please sign in to comment.