Jerry Xue
Jerry Xue

Reputation: 331

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\munge.py 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 pandas.core.common.py source code, mask_missing is not defined there. May I know which version of Pandas we should use?


I found this online: http://nullege.com/codes/show/src%40p%40a%40pandas-0.13.1%40pandas%40core%40generic.py/53/pandas.core.common.mask_missing/python

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

Upvotes: 1

Views: 375

Answers (2)

Matthew Fairleaf
Matthew Fairleaf

Reputation: 147

This is a version compatibility problem. You need pandas 0.17.1. Pandas 0.16.1 doesn't play well with numpy. This code snippet is confirmed to work in 64-bit windows

conda create --name backtesting python=3.4 zipline=0.9.0 pandas=0.17.1

Upvotes: 0

mobiusklein
mobiusklein

Reputation: 1423

From the zipline git repository, it looks like you need 0.16.1 of pandas, based upon this line: https://github.com/quantopian/zipline/blob/master/etc/requirements.txt#L17

Going back to that release in the pandas repository, that function is indeed there: https://github.com/pydata/pandas/blob/v0.16.1/pandas/core/common.py#L497

Upvotes: 2

Related Questions