Skip to content
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

ENH: Add typing support #46155

Closed
Matheus-Rangel opened this issue Feb 25, 2022 · 1 comment
Closed

ENH: Add typing support #46155

Matheus-Rangel opened this issue Feb 25, 2022 · 1 comment
Labels
Enhancement Needs Triage Issue that has not been reviewed by a pandas team member

Comments

@Matheus-Rangel
Copy link

Matheus-Rangel commented Feb 25, 2022

Describe the solution you'd like

Add type the possibility to add type hints on Dataframes and Series. This would improve the readability of functions that are using dataframes.

@dataclass
class Quote:
  id: str
  price: float
  submit_date: date

@dataclass
class PriceQuarter:
  price: float
  quarter: str

def get_max_price_by_quarter(quotes: DataFrame[Quote]) -> DataFrame[PriceQuarter]:
  ...
@Matheus-Rangel Matheus-Rangel added Enhancement Needs Triage Issue that has not been reviewed by a pandas team member labels Feb 25, 2022
@Matheus-Rangel Matheus-Rangel changed the title ENH: Add typing support hint ENH: Add typing support Feb 25, 2022
@mroeschke
Copy link
Member

Thanks for the request. This is an ongoing effort in #28142 and #45253 and #45252. Happy to have contributions over in those issue or pull requests to improve typing

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Enhancement Needs Triage Issue that has not been reviewed by a pandas team member
Projects
None yet
Development

No branches or pull requests

2 participants