-
-
Notifications
You must be signed in to change notification settings - Fork 143
ENH: Improve api.types #274
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
Merged
Merged
Changes from all commits
Commits
Show all changes
3 commits
Select commit
Hold shift + click to select a range
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,9 @@ | ||
no_default = None | ||
|
||
def infer_dtype(value: object, skipna: bool = ...) -> str: ... | ||
def is_iterator(obj: object) -> bool: ... | ||
def is_scalar(val: object) -> bool: ... | ||
def is_list_like(obj: object, allow_sets: bool = ...) -> bool: ... | ||
def is_interval(val: object) -> bool: ... | ||
def is_complex(val: object) -> bool: ... | ||
def is_bool(val: object) -> bool: ... | ||
def is_integer(val: object) -> bool: ... | ||
def is_float(val: object) -> bool: ... |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,28 +0,0 @@ | ||
import numpy as np | ||
|
||
from pandas._typing import Dtype | ||
|
||
def is_nested_object(obj) -> bool: ... | ||
def infer_dtype_from(val, pandas_dtype: bool = ...): ... | ||
def infer_dtype_from_scalar(val, pandas_dtype: bool = ...): ... | ||
def infer_dtype_from_array(arr, pandas_dtype: bool = ...): ... | ||
def invalidate_string_dtypes(dtype_set) -> None: ... | ||
def coerce_indexer_dtype(indexer, categories): ... | ||
def astype_nansafe(arr, dtype, copy: bool = ..., skipna: bool = ...): ... | ||
def soft_convert_objects( | ||
values: np.ndarray, | ||
datetime: bool = ..., | ||
numeric: bool = ..., | ||
timedelta: bool = ..., | ||
coerce: bool = ..., | ||
copy: bool = ..., | ||
): ... | ||
def convert_dtypes( | ||
input_array, | ||
convert_string: bool = ..., | ||
convert_integer: bool = ..., | ||
convert_boolean: bool = ..., | ||
) -> Dtype: ... | ||
def find_common_type(types): ... | ||
def construct_1d_arraylike_from_scalar(value, length: int, dtype): ... | ||
def construct_1d_object_array_from_listlike(values): ... | ||
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,16 @@ | ||
def concat_compat(to_concat, axis: int = ...): ... | ||
from typing import ( | ||
TypeVar, | ||
Union, | ||
) | ||
|
||
from pandas import ( | ||
Categorical, | ||
CategoricalIndex, | ||
Series, | ||
) | ||
|
||
_CatT = TypeVar("_CatT", bound=Union[Categorical, CategoricalIndex, Series]) | ||
|
||
def union_categoricals( | ||
to_union, sort_categories: bool = ..., ignore_order: bool = ... | ||
): ... | ||
to_union: list[_CatT], sort_categories: bool = ..., ignore_order: bool = ... | ||
) -> Categorical: ... |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,15 +1,5 @@ | ||
from pandas import ( | ||
DataFrame, | ||
Index, | ||
Series, | ||
) | ||
from pandas import Series | ||
from pandas.core.arrays import ExtensionArray | ||
from pandas.core.generic import NDFrame | ||
|
||
ABCIndex = type[Index] | ||
|
||
ABCNDFrame = type[NDFrame] | ||
ABCSeries = type[Series] | ||
ABCDataFrame = type[DataFrame] | ||
|
||
ABCExtensionArray = type[ExtensionArray] |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,19 +1,19 @@ | ||
def is_bool(obj) -> bool: ... | ||
def is_integer(obj) -> bool: ... | ||
def is_float(obj) -> bool: ... | ||
def is_complex(obj) -> bool: ... | ||
def is_scalar(obj) -> bool: ... | ||
def is_decimal(obj) -> bool: ... | ||
def is_interval(obj) -> bool: ... | ||
def is_list_like(obj) -> bool: ... | ||
def is_number(obj) -> bool: ... | ||
def is_iterator(obj) -> bool: ... | ||
def is_file_like(obj) -> bool: ... | ||
def is_re(obj) -> bool: ... | ||
def is_re_compilable(obj) -> bool: ... | ||
def is_array_like(obj) -> bool: ... | ||
def is_nested_list_like(obj) -> bool: ... | ||
def is_dict_like(obj) -> bool: ... | ||
def is_named_tuple(obj) -> bool: ... | ||
def is_hashable(obj) -> bool: ... | ||
def is_sequence(obj) -> bool: ... | ||
from pandas._libs import lib | ||
is_bool = lib.is_bool | ||
is_integer = lib.is_integer | ||
is_float = lib.is_float | ||
is_complex = lib.is_complex | ||
is_scalar = lib.is_scalar | ||
is_interval = lib.is_interval | ||
is_list_like = lib.is_list_like | ||
is_iterator = lib.is_iterator | ||
def is_number(obj: object) -> bool: ... | ||
def is_file_like(obj: object) -> bool: ... | ||
def is_re(obj: object) -> bool: ... | ||
def is_array_like(obj: object) -> bool: ... | ||
def is_re_compilable(obj: object) -> bool: ... | ||
def is_dict_like(obj: object) -> bool: ... | ||
def is_named_tuple(obj: object) -> bool: ... | ||
def is_hashable(obj: object) -> bool: ... |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,8 +1,5 @@ | ||
import numpy as np | ||
|
||
from pandas.core.dtypes.generic import ( | ||
ABCExtensionArray as ABCExtensionArray, | ||
ABCSeries, | ||
) | ||
from pandas.core.dtypes.generic import ABCSeries | ||
|
||
def should_extension_dispatch(left: ABCSeries, right) -> bool: ... |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.