Skip to content

error: Argument 1 to "astype" of "DataFrame" has incompatible type "Series[Any]" [arg-type] #410

Closed
@randolf-scholz

Description

@randolf-scholz
import pandas as pd

df = pd.DataFrame({"a": [1, 2, 3], "b": [4, 5, 6]})
df = df.astype(df.dtypes)  # ✘ raises [arg-type]

Please complete the following information:

  • python 3.10.6
  • mypy 0.982
  • pandas 1.5.1
  • pandas-stubs 1.5.1.221024

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions