Here is a workaround how to achieve this manually:
import pandas as pd
import numpy as np
from numpy.random import rand
dfPP=pd.DataFrame(rand(3,5),columns=rand(5),index=rand(3))
nanarr=np.empty(dfPP.shape[0])
nanarr[:]=np.NAN
new_point=dfPP.columns.values.mean()
dfPP.loc[:,new_point]=nanarr
dfPP.sort(axis=1,inplace=True)
dfPP.head()
0.211451507884 | 0.574409309122 | 0.626609642735 | 0.728622716072 | 0.752814445643 | 0.865750234955 | |
---|---|---|---|---|---|---|
0.340822 | 0.451636 | 0.292137 | NaN | 0.162465 | 0.481506 | 0.384237 |
0.996621 | 0.997825 | 0.957920 | NaN | 0.728265 | 0.916599 | 0.286137 |
0.711955 | 0.091902 | 0.951715 | NaN | 0.363268 | 0.344484 | 0.661254 |
dfPP=dfPP.interpolate(method='values',axis=1)
dfPP.head()
0.211451507884 | 0.574409309122 | 0.626609642735 | 0.728622716072 | 0.752814445643 | 0.865750234955 | |
---|---|---|---|---|---|---|
0.340822 | 0.451636 | 0.292137 | 0.248244 | 0.162465 | 0.481506 | 0.384237 |
0.996621 | 0.997825 | 0.957920 | 0.880183 | 0.728265 | 0.916599 | 0.286137 |
0.711955 | 0.091902 | 0.951715 | 0.752529 | 0.363268 | 0.344484 | 0.661254 |
Comment From: jreback
pls provide an example of what you are looking in the top of the issue
Comment From: den-run-ai
provided the example above, so the new optional arguments are the following:
DataFrame.interpolate(new_columns=[x,y,z], new_rows=[a,b,c], _args, *_kwargs)
Comment From: mroeschke
Thanks for the suggestion, but since there hasn't been much community or core dev interest in years going to close. Happy to reopen if there's renewed interest