question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

API: Add pandas.api.aux

See original GitHub issue

Revision 2:

Currently many intermediate classes can only be found in pandas.core, for example DataFrameGroupBy and SeriesGroupBy. These classes should not be instantiated directly, but may be necessary to access for users who use type-hinting. I think we should add these classes to a new API submodule, pandas.api.aux as they are auxiliary classes. Users shouldn’t need to know e.g. they are defined in pandas.core.groupby.generic.

Somewhat related: #6944, #19302

cc @pandas-dev/pandas-core @pandas-dev/pandas-triage for feedback.

Original Currently one cannot run `from pandas import DataFrameGroupBy, SeriesGroupBy`. We should add these classes to the top level as they are particularly important for type-hinting in user code. Users shouldn't need to know they are defined in `pandas.core.groupby.generic`.
Revision 1 Currently one cannot run `from pandas import DataFrameGroupBy, SeriesGroupBy`. We should add these classes to a new API submodule, `pandas.api.trying` as they are particularly important for type-hinting in user code. Users shouldn't need to know they are defined in `pandas.core.groupby.generic`.

Issue Analytics

  • State:open
  • Created a year ago
  • Comments:24 (24 by maintainers)

github_iconTop GitHub Comments

1reaction
topper-123commented, Sep 25, 2022

+1 on somewhere in pd.api, I don’t have a very strong preference on pd.api.types or pd.api.typing. Maybe just make update the PR with your preferred solution (pd.api.typing?), remove the draft marker and see the response?

There are probably a few other classes that could be exposed publicly, e…g. Resampler is one I can think of, but there are probably others also.

0reactions
Dr-Irvcommented, Dec 16, 2022

In this sense, both numpy.typing and pandas.api.typing would contain classes for the user to add type hints to their code, regardless of if that user is going to use static type-checking.

I see your point. As long as we document it that way, I won’t stand in the way of calling it pandas.api.typing .

Read more comments on GitHub >

github_iconTop Results From Across the Web

API Calls within a Pandas Dataframe API using Pandas Apply
This post is going to show you a basic example of how you can use the pandas apply method to enrich a dataframe...
Read more >
API: Add DataFrameGroupBy and SeriesGroupBy to top level ...
rhshadrach wants to merge 18 commits into pandas-dev:main. base: main ... closes API: Add pandas.api.aux #48577 (Replace xxxx with the Github issue number)...
Read more >
API reference — pandas 1.5.2 documentation
API reference#. This page gives an overview of all public pandas objects, functions and methods. All classes and functions exposed in pandas.
Read more >
News API - Getting output into Pandas DataFrame
Does anyone know a better way? If you were to work with the current dataframe, how would you get the dictionary out of...
Read more >
Introduction to the Spatially Enabled DataFrame
NOTE: See Pandas DataFrame head() method documentation for details. You can also use sql queries to return a subset of records by leveraging...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found