Skip to content

Commit 6017e25

Browse files
committed
Fixed up whitespace for pep8
1 parent b4b09bf commit 6017e25

File tree

1 file changed

+13
-7
lines changed

1 file changed

+13
-7
lines changed

pandas/tools/tests/test_pivot.py

+13-7
Original file line numberDiff line numberDiff line change
@@ -781,13 +781,19 @@ def test_pivot_table_with_iterator_values(self):
781781

782782
def test_pivot_table_margins_name_with_aggfunc_list(self):
783783
# GH 13354
784-
margins_name='Weekly'
785-
costs = pd.DataFrame({'item':['bacon','cheese','bacon','cheese'],
786-
'cost':[2.5,4.5,3.2,3.3],
787-
'day':['M','M','T','T']})
788-
table = costs.pivot_table(index="item",columns="day",margins=True,
789-
margins_name=margins_name,aggfunc=[np.mean,max])
790-
ix = pd.Index(['bacon', 'cheese', margins_name], dtype='object', name='item')
784+
margins_name = 'Weekly'
785+
costs = pd.DataFrame(
786+
{'item': ['bacon', 'cheese', 'bacon', 'cheese'],
787+
'cost': [2.5, 4.5, 3.2, 3.3],
788+
'day': ['M', 'M', 'T', 'T']}
789+
)
790+
table = costs.pivot_table(
791+
index="item", columns="day", margins=True,
792+
margins_name=margins_name, aggfunc=[np.mean, max]
793+
)
794+
ix = pd.Index(
795+
['bacon', 'cheese', margins_name], dtype='object', name='item'
796+
)
791797
tups = [('mean', 'cost', 'M'), ('mean', 'cost', 'T'),
792798
('mean', 'cost', margins_name), ('max', 'cost', 'M'),
793799
('max', 'cost', 'T'), ('max', 'cost', margins_name)]

0 commit comments

Comments
 (0)