-
Notifications
You must be signed in to change notification settings - Fork 118
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
interpolate(inplace=True)
doesn't work running after filter
#806
Comments
Thank you for starting this issue, but can you clarify why the "direct approach" did not work as expected? df.interpolate(2040, inplace=True) |
Because my dataframe includes additional rows with missing values in the year 2050. I expected the command would apply the method in the subgroup by using |
Ok, I see - there are two issues. First, you are doing a chained operation. If you spell this out explicitly, it should be clear why x = df.filter(model="MENR*", variable='Primary Energy*')
x.interpolate(2040, inplace=True) So the Second, yes, I guess that your solution is indeed the best short-term strategy. I'll start a new, targeted issue. |
Referring to #240, I managed to walk around a similar problem with
interpolate
as below.Interpolating all the dataframe didn't work as remaining dataset had missing data for the year
2050
. So I needed to interpolate this part and merge into the original dataframe which I managed in four command lines.The text was updated successfully, but these errors were encountered: