Skip to content

Commit affdb26

Browse files
committed
fixed pivot_table argument and test_pivot_table
1 parent 0f70c14 commit affdb26

File tree

2 files changed

+3
-3
lines changed

2 files changed

+3
-3
lines changed

pandas-stubs/core/frame.pyi

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1295,7 +1295,7 @@ class DataFrame(NDFrame, OpsMixin):
12951295
dropna: _bool = ...,
12961296
margins_name: _str = ...,
12971297
observed: _bool = ...,
1298-
sort: _bool = True,
1298+
sort: _bool = ...,
12991299
) -> DataFrame: ...
13001300
@overload
13011301
def stack(

tests/test_frame.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1094,8 +1094,8 @@ def test_pivot_table_sort():
10941094
'c': [5, 6],
10951095
'd': [7, 8]}
10961096
)
1097-
result = df.pivot_table(values='a', index='b', columns='c', sort=True)
1098-
assert result is not None
1097+
check(assert_type(df.pivot_table(values='a', index='b', columns='c', sort=True),
1098+
pd.DataFrame), pd.DataFrame)
10991099

11001100

11011101
def test_types_groupby_as_index() -> None:

0 commit comments

Comments
 (0)