Skip to content

makeMissingDataFrame is broken #6602

Closed
Closed
@jseabold

Description

@jseabold

Did something change in iloc...? I could have sworn this worked and we talked about it during the PR. I was told not to use values but to use iloc instead IIRC.

[~/]
[18]: pd.version.version
[18]: '0.13.1-254-g150f323'


from pandas.util.testing import _create_missing_idx
df = pd.util.testing.makeDataFrame()
density = .9
random_state = None

i, j = _create_missing_idx(*df.shape, density=density,
                           random_state=random_state)
df.iloc[i, j] = np.nan

This must be a copy because there's no assignment.

This still works

df.values[i, j] = np.nan

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions