Skip to content
This repository was archived by the owner on Apr 14, 2022. It is now read-only.
This repository was archived by the owner on Apr 14, 2022. It is now read-only.

Sub-packages of pandas do not appear #1870

Description

@drorata

I don't know whether it's a bug or not, but please consider the following behavior:

pandas_sub_package

First, I import pandas and it all looks fine. Next, I want to type from pandas.io.json import json_normalize and it works nicely as well. Lastly, I want to try pd.io.json.json_normalize directly, and this is where the behavior is unfriendly. The LS doesn't find neither io nor json when I start typing pd..

So, is this a bug or an expected behavior? If it's neither, how can I workaround it?

Activity

  1. MikhailArkhipov commented on Jan 24, 2020

    @MikhailArkhipov

    This is b/c pandas has io submodule and hence pandas.io works in import statement completion. However, __init__.py does not directly import io and only has from pandas.io.api .... So io does not appear in exported items. I guess submodules should be added there too.

  2. drorata commented on Jan 24, 2020

    @drorata
    Author

    What __init__.py are you referring to?

  3. MikhailArkhipov commented on Jan 24, 2020

    @MikhailArkhipov

    The one in site-packages/pandas folder.

  4. drorata commented on Jan 25, 2020

    @drorata
    Author

    So is this a pandas bug??

  5. MikhailArkhipov commented on Jan 25, 2020

    @MikhailArkhipov

    No, LS completion issue. I think submodules should appear in the list even if not explicitly imported.

  6. drorata commented on Feb 20, 2020

    @drorata
    Author

    Mikhail Arkhipov (@MikhailArkhipov) Can it be that a similar problem happens with numpy.testing?

  7. MikhailArkhipov commented on Mar 19, 2020

    @MikhailArkhipov

    Unfortunately, change regressed more than it fixed. Reverting, needs more work.

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

Metadata

Metadata

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions