Skip to content

BUG?: _is_view == False for DataFrame from DataFrame #11814

Closed
@nickeubank

Description

@nickeubank

Constructing off a dataframe creates a de facto view, but ._is_view reports false. Seems like a bug.

In [1]:
    df = pd.DataFrame({'col1':[1,2], 'col2':[3,4]})
    df2 = pd.DataFrame(df)
    df2._is_view     
Out[1]:
    False

In [2]:
    df.loc[0,'col1'] = -88
    df2
Out[2]:
    col1    col2
    0   -88 3
    1   2   4

Suggestions on how best to fix?

Metadata

Metadata

Assignees

No one assigned

    Labels

    InternalsRelated to non-user accessible pandas implementationUsage Question

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions