8000 ENH: fill_value argument for shift #15486 by ahcub · Pull Request #24128 · pandas-dev/pandas · GitHub
[go: up one dir, main page]

Skip to content

ENH: fill_value argument for shift #15486 #24128

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 113 commits into from
Dec 26, 2018
Merged
Changes from 1 commit
Commits
Show all changes
113 commits
Select commit Hold shift + click to select a range
c3e550c
Merge pull request #3 from pandas-dev/master
ahcub Dec 6, 2018
9ab2d4d
ENH: fill_value argument for shift
ahcub Dec 6, 2018
6b4789d
!U remove the data frame part form the time series
ahcub Dec 6, 2018
57c087e
!U remove the data frame part form the time series
ahcub Dec 6, 2018
1852ea6
!U fix formatting
ahcub Dec 6, 2018
3461271
!U add test for data_frame
ahcub Dec 6, 2018
8b5cedb
!U remove fill_value from tshift
ahcub Dec 6, 2018
27226fa
!U remove unrelevant change
ahcub Dec 6, 2018
29b8a6e
!U add doc for new fill_value argument for shift method
ahcub Dec 6, 2018
cf6b2dd
!U add GH number
ahcub Dec 6, 2018
9f9962c
!U add versionated tag
ahcub Dec 6, 2018
4c7b762
!U add fill_value to the group by interface
ahcub Dec 6, 2018
b36ca43
!U replace np.nan to None
ahcub Dec 6, 2018
a36e7c7
!U replace np.nan to None
ahcub Dec 6, 2018
4c2ec2c
!U add fill_value to the locations where it was missing
ahcub Dec 7, 2018
fbf3d73
!U fix series test
ahcub Dec 7, 2018
bb722a6
!U fix method name and values comparison for the new test
ahcub Dec 7, 2018
1b1fdc2
!U fix dataframe constructor
ahcub Dec 7, 2018
c3f462c
!U change the assert method used for new tests
ahcub Dec 7, 2018
e44b514
!U change formatting and doc scripts
ahcub Dec 8, 2018
38f621c
!U add doc strings
ahcub Dec 8, 2018
d9d9fdb
!U add check for fill_value present in the categorical categories
ahcub Dec 8, 2018
cc6f370
!U change test for frame ahcub Dec 9, 2018
3619410
!U change test for series shift with fill value to avoid formatting e…
ahcub Dec 9, 2018
ca5ba24
!U remove dot
ahcub Dec 9, 2018
c195a13
!U remove empty line
ahcub Dec 9, 2018
af90a00
!U fix the line lenght
ahcub Dec 9, 2018
2f9b712
!U format the exception message
ahcub Dec 9, 2018
bbfe7f9
!U fix indents
ahcub Dec 9, 2018
ef55afb
!U fix indents
ahcub Dec 9, 2018
ce3d3c7
!U remove whitespaces
ahcub Dec 9, 2018
e6103a4
!U remove whitespaces
ahcub Dec 9, 2018
d18b6b7
!U fix the line width
ahcub Dec 9, 2018
931df66
!U fix the imports width
ahcub Dec 9, 2018
83f9157
Merge branch 'master' into master
ahcub Dec 9, 2018
81c01bc
!U restore the fill_value
ahcub Dec 9, 2018
4ae4d0b
!U revert imports
ahcub Dec 9, 2018
d4d43a3
!U revert new lines deletion
ahcub Dec 9, 2018
1366161
!U revert changes in imports
ahcub Dec 9, 2018
2643aa5
!U revert changes in imports
ahcub Dec 9, 2018
c010413
!U revert changes in imports
ahcub Dec 9, 2018
689bf8e
!U revert imports
ahcub Dec 9, 2018
463964b
!U revert imports
ahcub Dec 9, 2018
b90b00f
!U revert imports
ahcub Dec 9, 2018
18fab2f
!U revert imports
ahcub Dec 9, 2018
cb03215
!U revert imports
ahcub Dec 9, 2018
c8242f3
!U revert imports
ahcub Dec 9, 2018
8e946cc
!U revert imports
ahcub Dec 9, 2018
69e47f3
!U revert imports
ahcub Dec 9, 2018
8765bee
!U revert imports
ahcub Dec 9, 2018
9d10a6b
!U remove doc from the doc
ahcub Dec 9, 2018
6f4078a
!U change description
ahcub Dec 9, 2018
4227dda
!U change check for isna instead of is None
ahcub Dec 9, 2018
ce721ae
!U remove the -1 implementation detail
ahcub Dec 9, 2018
c743004
!U change doc description + added .. versionadded:: 0.24.0 tag
ahcub Dec 9, 2018
03e3bd4
!U add test for sparse array shift with fill_value
ahcub Dec 11, 2018
e4313da
!U add test for gorupby
ahcub Dec 11, 2018
85d2b16
!U add PR specification to the test
ahcub Dec 11, 2018
da90e89
!U adjust types
ahcub Dec 11, 2018
d71be8a
!U fix the groupby test
ahcub Dec 11, 2018
aca6c9c
!U add check for fill value in defining the type for result data set
ahcub Dec 11, 2018
20361c7
!U fix the types in the test
ahcub Dec 11, 2018
599ccb7
!U fix the test for groupby shift
ahcub Dec 12, 2018
1ac273a
!U update notation of the base shift method
ahcub Dec 12, 2018
b2074a8
!U test categorical shift
ahcub Dec 12, 2018
0fe2f95
!U change the test for categorical
ahcub Dec 12, 2018
7d33f21
!U add check for fill value is not None
ahcub Dec 12, 2018
578859b
!U change n_rows to smaller value
ahcub Dec 12, 2018
a016df3
!U select Z column
ahcub Dec 12, 2018
3947394
!U select as DataFrame
ahcub Dec 12, 2018
b266a50
!U fix formatting errors
ahcub Dec 12, 2018
fa808a4
!U add specification comment
ahcub Dec 13, 2018
71b8df1
!U change test for categorical
ahcub Dec 13, 2018
31a844e
!U add check for different parameters
ahcub Dec 13, 2018
18cbd95
!U move the check to the top
ahcub Dec 13, 2018
d068150
!U remove index test
ahcub Dec 13, 2018
e665f7d
!U remove the None from the list
ahcub Dec 14, 2018
c5a95cb
!U change the sparse ArrayTest
ahcub Dec 14, 2018
b03a3fd
change the way for parametrizing a test
ahcub Dec 17, 2018
d9efb45
update the doc
ahcub Dec 17, 2018
60595c9
update doc
ahcub Dec 17, 2018
7fc9900
add a test for dtype
ahcub Dec 17, 2018
e1a83e2
fix the parametrize arguments
ahcub Dec 17, 2018
7b587c2
!U change the doc formatting
ahcub Dec 18, 2018
7bf6768
!U remove the trailing whitespaces
ahcub Dec 18, 2018
09f0fde
Update pandas/core/generic.py
TomAugspurger Dec 18, 2018
6d65cfa
!U try to remove res_type
ahcub Dec 18, 2018
2162c18
Merge remote-tracking branch 'origin/master'
ahcub Dec 18, 2018
3f9b62b
!U add test for categorical shift with fill value as nan
ahcub Dec 18, 2018
8fa8a15
add different variation of nan
ahcub Dec 18, 2018
988507a
Merge branch 'master' into master
ahcub Dec 20, 2018
6c96108
added base test
TomAugspurger Dec 20, 2018
eb48cfe
change the fill_value so the result data set stays int
ahcub Dec 25, 2018
a72cffe
add a blank line before the version tag
ahcub Dec 25, 2018
25b4661
add a blank line before the version tag
ahcub Dec 25, 2018
d817d0c
Merge remote-tracking branch 'origin/master'
ahcub Dec 25, 2018
0afad10
change the fill_value check for na
ahcub Dec 25, 2018
bb67905
parametrize on fill value with decorator instead of the test internals
ahcub Dec 25, 2018
f5aad59
change check for is None to isna
ahcub Dec 25, 2018
025f0db
change check for is None to isna
ahcub Dec 25, 2018
8ce460a
change check for is None to isna
ahcub Dec 25, 2018
dce5aa1
change check for is None to isna
ahcub Dec 25, 2018
d60632a
fix imports sorting
ahcub Dec 25, 2018
a0ab35d
fix imports sorting
ahcub Dec 25, 2018
fd23842
fix imports sorting
ahcub Dec 25, 2018
3503e86
fix imports sorting
ahcub Dec 25, 2018
674f15d
Add the whatsnew entry
ahcub Dec 25, 2018
3c896ab
change func to meth
ahcub Dec 25, 2018
b9d335a
change the description in whatsnew
ahcub Dec 25, 2018
4fcca01
fix typo
ahcub Dec 25, 2018
a24f5c8
Add categorical to the description
ahcub Dec 25, 2018
a92ddfb
change import of isna in test
ahcub Dec 26, 2018
a03cbf5
add backticks for fill_value and add the issue number
ahcub Dec 26, 2018
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
change check for is None to isna
  • Loading branch information
ahcub committed Dec 25, 2018
commit dce5aa1799e0080d85e4265490a315831ec4f70a
2 changes: 1 addition & 1 deletion pandas/core/groupby/groupby.py
Original file line number Diff line number Diff line change
Expand Up @@ -2009,7 +2009,7 @@ def shift(self, periods=1, freq=None, axis=0, fill_value=None):
.. versionadded:: 0.24.0
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

blank line here

"""

if freq is not None or axis != 0 or fill_value is not None:
if freq is not None or axis != 0 or not isna(fill_value):
return self.apply(lambda x: x.shift(periods, freq,
axis, fill_value))

Expand Down
0