-
-
Notifications
You must be signed in to change notification settings - Fork 18.1k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Annotate API-exposed Items from pandas.core.api #26766
Comments
@WillAyd I am not sure what exactly needs to be done. Do we need to annotate every attribute/method of class DataFrame, Index, etc.? Can you provide some example(mypy docs or SO link maybe) |
Yes that's correct - would want to add annotations to the methods for these objects (and attributes where inference may not work) |
Alright, I will start with DataFrame, since it's one of the few things in
pandas I use in my projects. I will open a new issue for it.
…On Tue, 11 Jun 2019, 12:23 am William Ayd, ***@***.***> wrote:
Yes that's correct - would want to add annotations to the methods for
these objects (and attributes where inference may not work)
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
<#26766?email_source=notifications&email_token=AFMJMLEF6TVCQMNDJMFMZDTPZ2PJDA5CNFSM4HWTSJS2YY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGODXK3MQQ#issuecomment-500545090>,
or mute the thread
<https://github.com/notifications/unsubscribe-auth/AFMJMLG2ABH4VDJNDYY4JVTPZ2PJDANCNFSM4HWTSJSQ>
.
|
I'm unpinning this to make room for #31879. Will re-pin tomorrow. |
@WillAyd I am not quite sure that I understand the meaning of this issue. class MyDataFrame(pandas.DataFrame):
col_foo: datetime.datetime
def func(df: MyDataFrame):
df['col_foo'].dt
func(MyDataFrame()) # mypy passes
func(pd.Dataframe(columns=['col_foo'] , dtype=np.datetime64)) # mypy passes?
func(pd.Dataframe(columns=['col_foo'])) # mypy raises error? I was looking for something that imitates the |
We can close this issue; I haven't tracked it in quite some time |
@WillAyd which issue tracks development of something similar to the type annotations I have mentioned above? |
Sounds good. Feel free to submit PRs to improve annotations - they are always welcome |
I think this has served its purpose. Closing. |
We currently expose all of the following items from pandas.core.api via the API:
A pseudo-prioritized list of annotations I think we need out of this would be the below. Open to suggestions on how to prioritize and obviously community PRs are very welcome!
...
These don't necessarily need to be completed in order. Will continue to expand checklist as we tackle more items so if you see something you'd like to tackle feel free to call it out
The text was updated successfully, but these errors were encountered: