Skip to content

Nonsensical table names on pd.concat #135

@guilhermebs

Description

@guilhermebs
import pdtable
import pandas as pd


tables = [
    pdtable.Table(
        pd.DataFrame({
            "col1": [1, 2],
            "col2": ["a", "b"]
        }),
        name="t1"
    ),
    pdtable.Table(
        pd.DataFrame({
            "col1": [3, 4],
            "col2": ["c", "d"]
        }),
        name="t2"
    ),
]


concat = pd.concat([t.df for t in tables], keys=[t.name for t in tables])

print(pdtable.Table(concat).name)
# >>> t1

expected behaviour: in the absence of a metadata that makes sense for all tables, the concat operation should return a plain pd.DataFrame

Metadata

Metadata

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