-
- Notifications
You must be signed in to change notification settings - Fork 19.4k
Closed
Labels
GroupbyRegressionFunctionality that used to work in a prior pandas versionFunctionality that used to work in a prior pandas versionWindowrolling, ewma, expandingrolling, ewma, expanding
Milestone
Description
Question about pandas
Let's say we have a DataFrame like the below.
>>> pdf = pd.DataFrame({"a": [1, 2, 3, 2], "b": [4.0, 2.0, 3.0, 1.0], "c": [10, 20, 30, 20]}) >>> pdf a b c 0 1 4.0 10 1 2 2.0 20 2 3 3.0 30 3 2 1.0 20Then, when I use GroupByRolling, In the version of pandas <= 1.0.5 shows result as below.
>>> pdf.groupby('a')[['b']].rolling(2).max() b a 1 0 NaN 3 2 NaN 2 1 NaN 3 2.0However, In the pandas 1.1.0, the result seems different from the previous version as below.
>>> pdf.groupby('a')[['b']].rolling(2).max() a b c a 1 0 NaN NaN NaN 2 1 NaN NaN NaN 3 2.0 2.0 20.0 3 2 NaN NaN NaNCould someone let me know Is it intended? or unexpected behavior (maybe kind of bug) ?
Thanks :)
tomzx
Metadata
Metadata
Assignees
Labels
GroupbyRegressionFunctionality that used to work in a prior pandas versionFunctionality that used to work in a prior pandas versionWindowrolling, ewma, expandingrolling, ewma, expanding