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

BUG: No overload variant of "quantile" of "DataFrame" matches argument type "ndarray[Any, dtype[floating[Any]]]" #81

Closed
bashtage opened this issue Jul 4, 2022 · 0 comments · Fixed by #87

Comments

@bashtage
Copy link
Contributor

bashtage commented Jul 4, 2022

DataFrame.quantile should accept Sequence[float] rather than just List[float].

import numpy as np
import pandas as pd

df = pd.DataFrame([np.arange(100.0)],columns=["a"])
df.quantile(np.array(0.25, 0.75])

Error is

error: No overload variant of "quantile" of "DataFrame" matches argument type "ndarray[Any, dtype[Any]]"
note: Possible overload variants:
note:     def quantile(self, q: float = ..., axis: Literal['columns', 'index', 0, 1] = ..., numeric_only: bool = ..., interpolation: Union[str, Literal['linear', 'lower', 'higher', 'midpoint', 'nearest']] = ...) -> Series[Any]      
note:     def quantile(self, q: List[float], axis: Literal['columns', 'index', 0, 1] = ..., numeric_only: bool = ..., interpolation: Union[str, Literal['linear', 'lower', 'higher', 'midpoint', 'nearest']] = ...) -> DataFrame 
@Dr-Irv Dr-Irv mentioned this issue Jul 4, 2022
2 tasks
@Dr-Irv Dr-Irv closed this as completed in #87 Jul 4, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant