Skip to content

ma.mrecords not found #5577

Closed
Closed
@dieterv77

Description

@dieterv77

Running into the issue below with pandas master and numpy compiled from 1.8.x maintenance branch. If i do "import numpy.ma.mrecords" in ipython and try again, then creating the DataFrame works fine. Maybe the best thing to do is to add "import numpy.ma.mrecords" in core/frame.py?

import numpy.ma as ma
import pandas
x = ma.masked_all((3,4))
df = pandas.DataFrame(x)

AttributeError                            Traceback (most recent call last)
<ipython-input-4-8935d2e6ea81> in <module>()
----> 1 df = pandas.DataFrame(x)

C:\Python27\lib\site-packages\pandas-0.12.0_1147_g39ad4cb-py2.7-win-amd64.egg\pandas\core\frame.pyc in __init__(self, data, index, columns, dtype, copy)
    203 
    204             # masked recarray
--> 205             if isinstance(data, ma.mrecords.MaskedRecords):
    206                 mgr = _masked_rec_array_to_mgr(data, index, columns, dtype,
    207                                                copy)

AttributeError: 'module' object has no attribute 'mrecords'

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions