Jerry Xue Jerry Xue - 1 year ago 99
Python Question

mask_missing is not defined in pandas.core.common?

Recently I installed zipline with Anaconda, together with it is pandas 0.18.1. When I tried to import zipline, it reports following error:

C:\Anaconda3\envs\helloworld\lib\site-packages\zipline\utils\ in <module>()

13 # See the License for the specific language governing permissions and

14 # limitations under the License.

---> 15 from pandas.core.common import mask_missing

16 try:

17 from pandas.core.common import backfill_2d, pad_2d

ImportError: cannot import name 'mask_missing'

Then I checked Pandas source code, mask_missing is not defined there. May I know which version of Pandas we should use?

I found this online:

It seems like in pandas 0.13 mask_missing is still there. I will downgrade pandas to 0.13 first and see if it solves problem

Answer Source

From the zipline git repository, it looks like you need 0.16.1 of pandas, based upon this line:

Going back to that release in the pandas repository, that function is indeed there: