-
-
Notifications
You must be signed in to change notification settings - Fork 18.3k
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
Value error on groupby bfill() #9970
Comments
pls supply an example which reproduces this or |
can you show a reproducible example and |
To get a reproducible example I tried manually grouping:
but it didn't cause an exception when I did it like that. I also tried to split it into smaller chunks to cut down the size but couldn't cut it much more than half the original size. If you can think of another method to get a minimal reproducing DataFrame please let me know. The output of
|
@arijun you need to provide a constructed dataframe and your code that repros e.g.
|
@arijun How big is your original dataframe? And may you share it? |
This produces @arijun error (using 0.16.2) s = pd.Series([1,1,0], index=[1,2,2])
s.groupby(s).fillna(method='bfill') It fails on calling |
Duplicate of #19437 |
I have a dataframe with a column containing some strings and NaNs. I can do do
df.col.bfill()
but when I try to dodf.groupby('col2').col1.bfill()
I get aValueError
.I can do
first
andapply(lambda x: x is str)
without error.Here is the full traceback:
The text was updated successfully, but these errors were encountered: