Skip to content

The code where swifter is not used will be impacted by swifter #223

Open

Description

@wanngxiang

image
I do not use swifter there. But it raises warnings about swifter. Why?

Environment:
python==3.10
pandas==2.0.3
swifter==1.4.0

Activity

  1. Nimmerfall commented on Oct 10, 2023

    @Nimmerfall

    Just having a wild guess (as i don't really know what's going on, but have the same phenomenon)
    Is there a call to swifter.set_defaults anywhere in your code?
    In my case there is, even though I happen to don't use swifter at all (doesn't seem to work with my use case)

    After seeing the intialization code I think what happens is, that an empty DataFrame (or Series) is constructed. I think it's happening to set stuff like partitioning and / or progress bars (see documentation on set_defaults: "NOTE: You must set the defaults before creating the dataframe because this entrypoint is part of the init"

    But i can't tell why an empty frame does seem to return True on Frame.index.duplicated().any()

    Hope that helps

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions