Skip to content

Commit d605251

Browse files
author
Nicholas Ver Halen
committed
Made sure pivot_table propped na columns
1 parent b3ae4c7 commit d605251

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

pandas/tools/pivot.py

+3
Original file line numberDiff line numberDiff line change
@@ -175,6 +175,9 @@ def pivot_table(data, values=None, index=None, columns=None, aggfunc='mean',
175175
if len(index) == 0 and len(columns) > 0:
176176
table = table.T
177177

178+
if isinstance(table, DataFrame) and dropna:
179+
table = table.dropna(how='all', axis=1)
180+
178181
return table
179182

180183

0 commit comments

Comments
 (0)