initial commit
This commit is contained in:
365
venv/Lib/site-packages/pandas/__init__.py
Normal file
365
venv/Lib/site-packages/pandas/__init__.py
Normal file
@@ -0,0 +1,365 @@
|
||||
from __future__ import annotations
|
||||
|
||||
|
||||
# start delvewheel patch
|
||||
def _delvewheel_patch_1_12_0():
|
||||
import os
|
||||
if os.path.isdir(libs_dir := os.path.abspath(os.path.join(os.path.dirname(__file__), os.pardir, 'pandas.libs'))):
|
||||
os.add_dll_directory(libs_dir)
|
||||
|
||||
|
||||
_delvewheel_patch_1_12_0()
|
||||
del _delvewheel_patch_1_12_0
|
||||
# end delvewheel patch
|
||||
|
||||
__docformat__ = "restructuredtext"
|
||||
|
||||
# Let users know if they're missing any of our hard dependencies
|
||||
# except tzdata (see https://github.com/pandas-dev/pandas/issues/63264)
|
||||
_hard_dependencies = ("numpy", "dateutil")
|
||||
|
||||
for _dependency in _hard_dependencies:
|
||||
try:
|
||||
__import__(_dependency)
|
||||
except ImportError as _e: # pragma: no cover
|
||||
raise ImportError(
|
||||
f"Unable to import required dependency {_dependency}. "
|
||||
"Please see the traceback for details."
|
||||
) from _e
|
||||
|
||||
del _hard_dependencies, _dependency
|
||||
|
||||
try:
|
||||
# numpy compat
|
||||
from pandas.compat import (
|
||||
is_numpy_dev as _is_numpy_dev, # pyright: ignore[reportUnusedImport] # noqa: F401
|
||||
)
|
||||
except ImportError as _err: # pragma: no cover
|
||||
_module = _err.name
|
||||
raise ImportError(
|
||||
f"C extension: {_module} not built. If you want to import "
|
||||
"pandas from the source directory, you may need to run "
|
||||
"'python -m pip install -ve . --no-build-isolation -Ceditable-verbose=true' "
|
||||
"to build the C extensions first."
|
||||
) from _err
|
||||
|
||||
from pandas._config import (
|
||||
get_option,
|
||||
set_option,
|
||||
reset_option,
|
||||
describe_option,
|
||||
option_context,
|
||||
options,
|
||||
)
|
||||
|
||||
# let init-time option registration happen
|
||||
import pandas.core.config_init # pyright: ignore[reportUnusedImport] # noqa: F401
|
||||
|
||||
from pandas.core.api import (
|
||||
# dtype
|
||||
ArrowDtype,
|
||||
Int8Dtype,
|
||||
Int16Dtype,
|
||||
Int32Dtype,
|
||||
Int64Dtype,
|
||||
UInt8Dtype,
|
||||
UInt16Dtype,
|
||||
UInt32Dtype,
|
||||
UInt64Dtype,
|
||||
Float32Dtype,
|
||||
Float64Dtype,
|
||||
CategoricalDtype,
|
||||
PeriodDtype,
|
||||
IntervalDtype,
|
||||
DatetimeTZDtype,
|
||||
StringDtype,
|
||||
BooleanDtype,
|
||||
# missing
|
||||
NA,
|
||||
isna,
|
||||
isnull,
|
||||
notna,
|
||||
notnull,
|
||||
# indexes
|
||||
Index,
|
||||
CategoricalIndex,
|
||||
RangeIndex,
|
||||
MultiIndex,
|
||||
IntervalIndex,
|
||||
TimedeltaIndex,
|
||||
DatetimeIndex,
|
||||
PeriodIndex,
|
||||
IndexSlice,
|
||||
# tseries
|
||||
NaT,
|
||||
Period,
|
||||
period_range,
|
||||
Timedelta,
|
||||
timedelta_range,
|
||||
Timestamp,
|
||||
date_range,
|
||||
bdate_range,
|
||||
Interval,
|
||||
interval_range,
|
||||
DateOffset,
|
||||
# conversion
|
||||
to_numeric,
|
||||
to_datetime,
|
||||
to_timedelta,
|
||||
# misc
|
||||
Flags,
|
||||
Grouper,
|
||||
factorize,
|
||||
unique,
|
||||
NamedAgg,
|
||||
array,
|
||||
Categorical,
|
||||
set_eng_float_format,
|
||||
Series,
|
||||
DataFrame,
|
||||
)
|
||||
from pandas.core.col import col
|
||||
|
||||
from pandas.core.dtypes.dtypes import SparseDtype
|
||||
|
||||
from pandas.tseries.api import infer_freq
|
||||
from pandas.tseries import offsets
|
||||
|
||||
from pandas.core.computation.api import eval
|
||||
|
||||
from pandas.core.reshape.api import (
|
||||
concat,
|
||||
lreshape,
|
||||
melt,
|
||||
wide_to_long,
|
||||
merge,
|
||||
merge_asof,
|
||||
merge_ordered,
|
||||
crosstab,
|
||||
pivot,
|
||||
pivot_table,
|
||||
get_dummies,
|
||||
from_dummies,
|
||||
cut,
|
||||
qcut,
|
||||
)
|
||||
|
||||
from pandas import api, arrays, errors, io, plotting, tseries
|
||||
from pandas import testing
|
||||
from pandas.util._print_versions import show_versions
|
||||
|
||||
from pandas.io.api import (
|
||||
# excel
|
||||
ExcelFile,
|
||||
ExcelWriter,
|
||||
read_excel,
|
||||
# parsers
|
||||
read_csv,
|
||||
read_fwf,
|
||||
read_table,
|
||||
# pickle
|
||||
read_pickle,
|
||||
to_pickle,
|
||||
# pytables
|
||||
HDFStore,
|
||||
read_hdf,
|
||||
# sql
|
||||
read_sql,
|
||||
read_sql_query,
|
||||
read_sql_table,
|
||||
# misc
|
||||
read_clipboard,
|
||||
read_parquet,
|
||||
read_orc,
|
||||
read_feather,
|
||||
read_html,
|
||||
read_xml,
|
||||
read_json,
|
||||
read_stata,
|
||||
read_sas,
|
||||
read_spss,
|
||||
read_iceberg,
|
||||
)
|
||||
|
||||
from pandas.io.json._normalize import json_normalize
|
||||
|
||||
from pandas.util._tester import test
|
||||
|
||||
# use the closest tagged version if possible
|
||||
_built_with_meson = False
|
||||
try:
|
||||
from pandas._version_meson import ( # pyright: ignore [reportMissingImports]
|
||||
__version__,
|
||||
__git_version__,
|
||||
)
|
||||
|
||||
_built_with_meson = True
|
||||
except ImportError:
|
||||
from pandas._version import get_versions
|
||||
|
||||
v = get_versions()
|
||||
__version__ = v.get("closest-tag", v["version"])
|
||||
__git_version__ = v.get("full-revisionid")
|
||||
del get_versions, v
|
||||
|
||||
|
||||
# module level doc-string
|
||||
__doc__ = """
|
||||
pandas - a powerful data analysis and manipulation library for Python
|
||||
=====================================================================
|
||||
|
||||
**pandas** is a Python package providing fast, flexible, and expressive data
|
||||
structures designed to make working with "relational" or "labeled" data both
|
||||
easy and intuitive. It aims to be the fundamental high-level building block for
|
||||
doing practical, **real world** data analysis in Python. Additionally, it has
|
||||
the broader goal of becoming **the most powerful and flexible open source data
|
||||
analysis / manipulation tool available in any language**. It is already well on
|
||||
its way toward this goal.
|
||||
|
||||
Main Features
|
||||
-------------
|
||||
Here are just a few of the things that pandas does well:
|
||||
|
||||
- Easy handling of missing data in floating point as well as non-floating
|
||||
point data.
|
||||
- Size mutability: columns can be inserted and deleted from DataFrame and
|
||||
higher dimensional objects
|
||||
- Automatic and explicit data alignment: objects can be explicitly aligned
|
||||
to a set of labels, or the user can simply ignore the labels and let
|
||||
`Series`, `DataFrame`, etc. automatically align the data for you in
|
||||
computations.
|
||||
- Powerful, flexible group by functionality to perform split-apply-combine
|
||||
operations on data sets, for both aggregating and transforming data.
|
||||
- Make it easy to convert ragged, differently-indexed data in other Python
|
||||
and NumPy data structures into DataFrame objects.
|
||||
- Intelligent label-based slicing, fancy indexing, and subsetting of large
|
||||
data sets.
|
||||
- Intuitive merging and joining data sets.
|
||||
- Flexible reshaping and pivoting of data sets.
|
||||
- Hierarchical labeling of axes (possible to have multiple labels per tick).
|
||||
- Robust IO tools for loading data from flat files (CSV and delimited),
|
||||
Excel files, databases, and saving/loading data from the ultrafast HDF5
|
||||
format.
|
||||
- Time series-specific functionality: date range generation and frequency
|
||||
conversion, moving window statistics, date shifting and lagging.
|
||||
"""
|
||||
|
||||
# Use __all__ to let type checkers know what is part of the public API.
|
||||
# Pandas is not (yet) a py.typed library: the public API is determined
|
||||
# based on the documentation.
|
||||
__all__ = [
|
||||
"NA",
|
||||
"ArrowDtype",
|
||||
"BooleanDtype",
|
||||
"Categorical",
|
||||
"CategoricalDtype",
|
||||
"CategoricalIndex",
|
||||
"DataFrame",
|
||||
"DateOffset",
|
||||
"DatetimeIndex",
|
||||
"DatetimeTZDtype",
|
||||
"ExcelFile",
|
||||
"ExcelWriter",
|
||||
"Flags",
|
||||
"Float32Dtype",
|
||||
"Float64Dtype",
|
||||
"Grouper",
|
||||
"HDFStore",
|
||||
"Index",
|
||||
"IndexSlice",
|
||||
"Int8Dtype",
|
||||
"Int16Dtype",
|
||||
"Int32Dtype",
|
||||
"Int64Dtype",
|
||||
"Interval",
|
||||
"IntervalDtype",
|
||||
"IntervalIndex",
|
||||
"MultiIndex",
|
||||
"NaT",
|
||||
"NamedAgg",
|
||||
"Period",
|
||||
"PeriodDtype",
|
||||
"PeriodIndex",
|
||||
"RangeIndex",
|
||||
"Series",
|
||||
"SparseDtype",
|
||||
"StringDtype",
|
||||
"Timedelta",
|
||||
"TimedeltaIndex",
|
||||
"Timestamp",
|
||||
"UInt8Dtype",
|
||||
"UInt16Dtype",
|
||||
"UInt32Dtype",
|
||||
"UInt64Dtype",
|
||||
"api",
|
||||
"array",
|
||||
"arrays",
|
||||
"bdate_range",
|
||||
"col",
|
||||
"concat",
|
||||
"crosstab",
|
||||
"cut",
|
||||
"date_range",
|
||||
"describe_option",
|
||||
"errors",
|
||||
"eval",
|
||||
"factorize",
|
||||
"from_dummies",
|
||||
"get_dummies",
|
||||
"get_option",
|
||||
"infer_freq",
|
||||
"interval_range",
|
||||
"io",
|
||||
"isna",
|
||||
"isnull",
|
||||
"json_normalize",
|
||||
"lreshape",
|
||||
"melt",
|
||||
"merge",
|
||||
"merge_asof",
|
||||
"merge_ordered",
|
||||
"notna",
|
||||
"notnull",
|
||||
"offsets",
|
||||
"option_context",
|
||||
"options",
|
||||
"period_range",
|
||||
"pivot",
|
||||
"pivot_table",
|
||||
"plotting",
|
||||
"qcut",
|
||||
"read_clipboard",
|
||||
"read_csv",
|
||||
"read_excel",
|
||||
"read_feather",
|
||||
"read_fwf",
|
||||
"read_hdf",
|
||||
"read_html",
|
||||
"read_iceberg",
|
||||
"read_json",
|
||||
"read_orc",
|
||||
"read_parquet",
|
||||
"read_pickle",
|
||||
"read_sas",
|
||||
"read_spss",
|
||||
"read_sql",
|
||||
"read_sql_query",
|
||||
"read_sql_table",
|
||||
"read_stata",
|
||||
"read_table",
|
||||
"read_xml",
|
||||
"reset_option",
|
||||
"set_eng_float_format",
|
||||
"set_option",
|
||||
"show_versions",
|
||||
"test",
|
||||
"testing",
|
||||
"timedelta_range",
|
||||
"to_datetime",
|
||||
"to_numeric",
|
||||
"to_pickle",
|
||||
"to_timedelta",
|
||||
"tseries",
|
||||
"unique",
|
||||
"wide_to_long",
|
||||
]
|
||||
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
45
venv/Lib/site-packages/pandas/_config/__init__.py
Normal file
45
venv/Lib/site-packages/pandas/_config/__init__.py
Normal file
@@ -0,0 +1,45 @@
|
||||
"""
|
||||
pandas._config is considered explicitly upstream of everything else in pandas,
|
||||
should have no intra-pandas dependencies.
|
||||
|
||||
importing `dates` and `display` ensures that keys needed by _libs
|
||||
are initialized.
|
||||
"""
|
||||
|
||||
__all__ = [
|
||||
"config",
|
||||
"describe_option",
|
||||
"detect_console_encoding",
|
||||
"get_option",
|
||||
"option_context",
|
||||
"options",
|
||||
"reset_option",
|
||||
"set_option",
|
||||
]
|
||||
from pandas._config import config
|
||||
from pandas._config import dates # pyright: ignore[reportUnusedImport] # noqa: F401
|
||||
from pandas._config.config import (
|
||||
_global_config,
|
||||
describe_option,
|
||||
get_option,
|
||||
option_context,
|
||||
options,
|
||||
reset_option,
|
||||
set_option,
|
||||
)
|
||||
from pandas._config.display import detect_console_encoding
|
||||
|
||||
|
||||
def using_string_dtype() -> bool:
|
||||
_mode_options = _global_config["future"]
|
||||
return _mode_options["infer_string"]
|
||||
|
||||
|
||||
def using_python_scalars() -> bool:
|
||||
_mode_options = _global_config["future"]
|
||||
return _mode_options["python_scalars"]
|
||||
|
||||
|
||||
def is_nan_na() -> bool:
|
||||
_mode_options = _global_config["future"]
|
||||
return not _mode_options["distinguish_nan_and_na"]
|
||||
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
954
venv/Lib/site-packages/pandas/_config/config.py
Normal file
954
venv/Lib/site-packages/pandas/_config/config.py
Normal file
@@ -0,0 +1,954 @@
|
||||
"""
|
||||
The config module holds package-wide configurables and provides
|
||||
a uniform API for working with them.
|
||||
|
||||
Overview
|
||||
========
|
||||
|
||||
This module supports the following requirements:
|
||||
- options are referenced using keys in dot.notation, e.g. "x.y.option - z".
|
||||
- keys are case-insensitive.
|
||||
- functions should accept partial/regex keys, when unambiguous.
|
||||
- options can be registered by modules at import time.
|
||||
- options can be registered at init-time (via core.config_init)
|
||||
- options have a default value, and (optionally) a description and
|
||||
validation function associated with them.
|
||||
- options can be deprecated, in which case referencing them
|
||||
should produce a warning.
|
||||
- deprecated options can optionally be rerouted to a replacement
|
||||
so that accessing a deprecated option reroutes to a differently
|
||||
named option.
|
||||
- options can be reset to their default value.
|
||||
- all option can be reset to their default value at once.
|
||||
- all options in a certain sub - namespace can be reset at once.
|
||||
- the user can set / get / reset or ask for the description of an option.
|
||||
- a developer can register and mark an option as deprecated.
|
||||
- you can register a callback to be invoked when the option value
|
||||
is set or reset. Changing the stored value is considered misuse, but
|
||||
is not verboten.
|
||||
|
||||
Implementation
|
||||
==============
|
||||
|
||||
- Data is stored using nested dictionaries, and should be accessed
|
||||
through the provided API.
|
||||
|
||||
- "Registered options" and "Deprecated options" have metadata associated
|
||||
with them, which are stored in auxiliary dictionaries keyed on the
|
||||
fully-qualified key, e.g. "x.y.z.option".
|
||||
|
||||
- the config_init module is imported by the package's __init__.py file.
|
||||
placing any register_option() calls there will ensure those options
|
||||
are available as soon as pandas is loaded. If you use register_option
|
||||
in a module, it will only be available after that module is imported,
|
||||
which you should be aware of.
|
||||
|
||||
- `config_prefix` is a context_manager (for use with the `with` keyword)
|
||||
which can save developers some typing, see the docstring.
|
||||
|
||||
"""
|
||||
|
||||
from __future__ import annotations
|
||||
|
||||
from contextlib import contextmanager
|
||||
import re
|
||||
from typing import (
|
||||
TYPE_CHECKING,
|
||||
Any,
|
||||
NamedTuple,
|
||||
cast,
|
||||
)
|
||||
import warnings
|
||||
|
||||
from pandas._typing import F
|
||||
from pandas.util._exceptions import find_stack_level
|
||||
|
||||
if TYPE_CHECKING:
|
||||
from collections.abc import (
|
||||
Callable,
|
||||
Generator,
|
||||
Sequence,
|
||||
)
|
||||
|
||||
|
||||
class DeprecatedOption(NamedTuple):
|
||||
key: str
|
||||
category: type[Warning]
|
||||
msg: str | None
|
||||
rkey: str | None
|
||||
removal_ver: str | None
|
||||
|
||||
|
||||
class RegisteredOption(NamedTuple):
|
||||
key: str
|
||||
defval: Any
|
||||
doc: str
|
||||
validator: Callable[[object], Any] | None
|
||||
cb: Callable[[str], Any] | None
|
||||
|
||||
|
||||
# holds deprecated option metadata
|
||||
_deprecated_options: dict[str, DeprecatedOption] = {}
|
||||
|
||||
# holds registered option metadata
|
||||
_registered_options: dict[str, RegisteredOption] = {}
|
||||
|
||||
# holds the current values for registered options
|
||||
_global_config: dict[str, Any] = {}
|
||||
|
||||
# keys which have a special meaning
|
||||
_reserved_keys: list[str] = ["all"]
|
||||
|
||||
|
||||
class OptionError(AttributeError, KeyError):
|
||||
"""
|
||||
Exception raised for pandas.options.
|
||||
|
||||
Backwards compatible with KeyError checks.
|
||||
|
||||
See Also
|
||||
--------
|
||||
options : Access and modify global pandas settings.
|
||||
|
||||
Examples
|
||||
--------
|
||||
>>> pd.options.context
|
||||
Traceback (most recent call last):
|
||||
OptionError: No such option
|
||||
"""
|
||||
|
||||
__module__ = "pandas.errors"
|
||||
|
||||
|
||||
#
|
||||
# User API
|
||||
|
||||
|
||||
def _get_single_key(pat: str) -> str:
|
||||
keys = _select_options(pat)
|
||||
if len(keys) == 0:
|
||||
_warn_if_deprecated(pat)
|
||||
raise OptionError(f"No such keys(s): {pat!r}")
|
||||
if len(keys) > 1:
|
||||
raise OptionError("Pattern matched multiple keys")
|
||||
key = keys[0]
|
||||
|
||||
_warn_if_deprecated(key)
|
||||
|
||||
key = _translate_key(key)
|
||||
|
||||
return key
|
||||
|
||||
|
||||
def get_option(pat: str) -> Any:
|
||||
"""
|
||||
Retrieve the value of the specified option.
|
||||
|
||||
This method allows users to query the current value of a given option
|
||||
in the pandas configuration system. Options control various display,
|
||||
performance, and behavior-related settings within pandas.
|
||||
|
||||
Parameters
|
||||
----------
|
||||
pat : str
|
||||
Regexp which should match a single option.
|
||||
|
||||
.. warning::
|
||||
|
||||
Partial matches are supported for convenience, but unless you use the
|
||||
full option name (e.g. x.y.z.option_name), your code may break in future
|
||||
versions if new options with similar names are introduced.
|
||||
|
||||
Returns
|
||||
-------
|
||||
Any
|
||||
The value of the option.
|
||||
|
||||
Raises
|
||||
------
|
||||
OptionError : if no such option exists
|
||||
|
||||
See Also
|
||||
--------
|
||||
set_option : Set the value of the specified option or options.
|
||||
reset_option : Reset one or more options to their default value.
|
||||
describe_option : Print the description for one or more registered options.
|
||||
|
||||
Notes
|
||||
-----
|
||||
For all available options, please view the :ref:`User Guide <options.available>`
|
||||
or use ``pandas.describe_option()``.
|
||||
|
||||
Examples
|
||||
--------
|
||||
>>> pd.get_option("display.max_columns") # doctest: +SKIP
|
||||
4
|
||||
"""
|
||||
key = _get_single_key(pat)
|
||||
|
||||
# walk the nested dict
|
||||
root, k = _get_root(key)
|
||||
return root[k]
|
||||
|
||||
|
||||
def set_option(*args) -> None:
|
||||
"""
|
||||
Set the value of the specified option or options.
|
||||
|
||||
This method allows fine-grained control over the behavior and display settings
|
||||
of pandas. Options affect various functionalities such as output formatting,
|
||||
display limits, and operational behavior. Settings can be modified at runtime
|
||||
without requiring changes to global configurations or environment variables.
|
||||
|
||||
Parameters
|
||||
----------
|
||||
*args : str | object | dict
|
||||
Arguments provided in pairs, which will be interpreted as (pattern, value),
|
||||
or as a single dictionary containing multiple option-value pairs.
|
||||
pattern: str
|
||||
Regexp which should match a single option
|
||||
value: object
|
||||
New value of option
|
||||
|
||||
.. warning::
|
||||
|
||||
Partial pattern matches are supported for convenience, but unless you
|
||||
use the full option name (e.g. x.y.z.option_name), your code may break in
|
||||
future versions if new options with similar names are introduced.
|
||||
|
||||
Returns
|
||||
-------
|
||||
None
|
||||
No return value.
|
||||
|
||||
Raises
|
||||
------
|
||||
ValueError if odd numbers of non-keyword arguments are provided
|
||||
TypeError if keyword arguments are provided
|
||||
OptionError if no such option exists
|
||||
|
||||
See Also
|
||||
--------
|
||||
get_option : Retrieve the value of the specified option.
|
||||
reset_option : Reset one or more options to their default value.
|
||||
describe_option : Print the description for one or more registered options.
|
||||
option_context : Context manager to temporarily set options in a ``with``
|
||||
statement.
|
||||
|
||||
Notes
|
||||
-----
|
||||
For all available options, please view the :ref:`User Guide <options.available>`
|
||||
or use ``pandas.describe_option()``.
|
||||
|
||||
Examples
|
||||
--------
|
||||
Option-Value Pair Input:
|
||||
|
||||
>>> pd.set_option("display.max_columns", 4)
|
||||
>>> df = pd.DataFrame([[1, 2, 3, 4, 5], [6, 7, 8, 9, 10]])
|
||||
>>> df
|
||||
0 1 ... 3 4
|
||||
0 1 2 ... 4 5
|
||||
1 6 7 ... 9 10
|
||||
[2 rows x 5 columns]
|
||||
>>> pd.reset_option("display.max_columns")
|
||||
|
||||
Dictionary Input:
|
||||
|
||||
>>> pd.set_option({"display.max_columns": 4, "display.precision": 1})
|
||||
>>> df = pd.DataFrame([[1, 2, 3, 4, 5], [6, 7, 8, 9, 10]])
|
||||
>>> df
|
||||
0 1 ... 3 4
|
||||
0 1 2 ... 4 5
|
||||
1 6 7 ... 9 10
|
||||
[2 rows x 5 columns]
|
||||
>>> pd.reset_option("display.max_columns")
|
||||
>>> pd.reset_option("display.precision")
|
||||
"""
|
||||
# Handle dictionary input
|
||||
if len(args) == 1 and isinstance(args[0], dict):
|
||||
args = tuple(kv for item in args[0].items() for kv in item)
|
||||
|
||||
nargs = len(args)
|
||||
if not nargs or nargs % 2 != 0:
|
||||
raise ValueError("Must provide an even number of non-keyword arguments")
|
||||
|
||||
for k, v in zip(args[::2], args[1::2], strict=True):
|
||||
key = _get_single_key(k)
|
||||
|
||||
opt = _get_registered_option(key)
|
||||
if opt and opt.validator:
|
||||
opt.validator(v)
|
||||
|
||||
# walk the nested dict
|
||||
root, k_root = _get_root(key)
|
||||
root[k_root] = v
|
||||
|
||||
if opt.cb:
|
||||
opt.cb(key)
|
||||
|
||||
|
||||
def describe_option(pat: str = "", _print_desc: bool = True) -> str | None:
|
||||
"""
|
||||
Print the description for one or more registered options.
|
||||
|
||||
Call with no arguments to get a listing for all registered options.
|
||||
|
||||
Parameters
|
||||
----------
|
||||
pat : str, default ""
|
||||
String or string regexp pattern.
|
||||
Empty string will return all options.
|
||||
For regexp strings, all matching keys will have their description displayed.
|
||||
_print_desc : bool, default True
|
||||
If True (default) the description(s) will be printed to stdout.
|
||||
Otherwise, the description(s) will be returned as a string
|
||||
(for testing).
|
||||
|
||||
Returns
|
||||
-------
|
||||
None
|
||||
If ``_print_desc=True``.
|
||||
str
|
||||
If the description(s) as a string if ``_print_desc=False``.
|
||||
|
||||
See Also
|
||||
--------
|
||||
get_option : Retrieve the value of the specified option.
|
||||
set_option : Set the value of the specified option or options.
|
||||
reset_option : Reset one or more options to their default value.
|
||||
|
||||
Notes
|
||||
-----
|
||||
For all available options, please view the
|
||||
:ref:`User Guide <options.available>`.
|
||||
|
||||
Examples
|
||||
--------
|
||||
>>> pd.describe_option("display.max_columns") # doctest: +SKIP
|
||||
display.max_columns : int
|
||||
If max_cols is exceeded, switch to truncate view...
|
||||
"""
|
||||
keys = _select_options(pat)
|
||||
if len(keys) == 0:
|
||||
raise OptionError(f"No such keys(s) for {pat=}")
|
||||
|
||||
s = "\n".join([_build_option_description(k) for k in keys])
|
||||
|
||||
if _print_desc:
|
||||
print(s)
|
||||
return None
|
||||
return s
|
||||
|
||||
|
||||
def reset_option(pat: str) -> None:
|
||||
"""
|
||||
Reset one or more options to their default value.
|
||||
|
||||
This method resets the specified pandas option(s) back to their default
|
||||
values. It allows partial string matching for convenience, but users should
|
||||
exercise caution to avoid unintended resets due to changes in option names
|
||||
in future versions.
|
||||
|
||||
Parameters
|
||||
----------
|
||||
pat : str/regex
|
||||
If specified only options matching ``pat*`` will be reset.
|
||||
Pass ``"all"`` as argument to reset all options.
|
||||
|
||||
.. warning::
|
||||
|
||||
Partial matches are supported for convenience, but unless you
|
||||
use the full option name (e.g. x.y.z.option_name), your code may break
|
||||
in future versions if new options with similar names are introduced.
|
||||
|
||||
Returns
|
||||
-------
|
||||
None
|
||||
No return value.
|
||||
|
||||
See Also
|
||||
--------
|
||||
get_option : Retrieve the value of the specified option.
|
||||
set_option : Set the value of the specified option or options.
|
||||
describe_option : Print the description for one or more registered options.
|
||||
|
||||
Notes
|
||||
-----
|
||||
For all available options, please view the
|
||||
:ref:`User Guide <options.available>`.
|
||||
|
||||
Examples
|
||||
--------
|
||||
>>> pd.reset_option("display.max_columns") # doctest: +SKIP
|
||||
"""
|
||||
keys = _select_options(pat)
|
||||
|
||||
if len(keys) == 0:
|
||||
raise OptionError(f"No such keys(s) for {pat=}")
|
||||
|
||||
if len(keys) > 1 and len(pat) < 4 and pat != "all":
|
||||
raise ValueError(
|
||||
"You must specify at least 4 characters when "
|
||||
"resetting multiple keys, use the special keyword "
|
||||
'"all" to reset all the options to their default value'
|
||||
)
|
||||
|
||||
for k in keys:
|
||||
set_option(k, _registered_options[k].defval)
|
||||
|
||||
|
||||
def get_default_val(pat: str):
|
||||
key = _get_single_key(pat)
|
||||
return _get_registered_option(key).defval
|
||||
|
||||
|
||||
class DictWrapper:
|
||||
"""provide attribute-style access to a nested dict"""
|
||||
|
||||
d: dict[str, Any]
|
||||
|
||||
def __init__(self, d: dict[str, Any], prefix: str = "") -> None:
|
||||
object.__setattr__(self, "d", d)
|
||||
object.__setattr__(self, "prefix", prefix)
|
||||
|
||||
def __setattr__(self, key: str, val: Any) -> None:
|
||||
prefix = object.__getattribute__(self, "prefix")
|
||||
if prefix:
|
||||
prefix += "."
|
||||
prefix += key
|
||||
# you can't set new keys
|
||||
# can you can't overwrite subtrees
|
||||
if key in self.d and not isinstance(self.d[key], dict):
|
||||
set_option(prefix, val)
|
||||
else:
|
||||
raise OptionError("You can only set the value of existing options")
|
||||
|
||||
def __getattr__(self, key: str):
|
||||
prefix = object.__getattribute__(self, "prefix")
|
||||
if prefix:
|
||||
prefix += "."
|
||||
prefix += key
|
||||
try:
|
||||
v = object.__getattribute__(self, "d")[key]
|
||||
except KeyError as err:
|
||||
raise OptionError("No such option") from err
|
||||
if isinstance(v, dict):
|
||||
return DictWrapper(v, prefix)
|
||||
else:
|
||||
return get_option(prefix)
|
||||
|
||||
def __dir__(self) -> list[str]:
|
||||
return list(self.d.keys())
|
||||
|
||||
|
||||
options = DictWrapper(_global_config)
|
||||
# DictWrapper defines a custom setattr
|
||||
object.__setattr__(options, "__module__", "pandas")
|
||||
|
||||
#
|
||||
# Functions for use by pandas developers, in addition to User - api
|
||||
|
||||
|
||||
@contextmanager
|
||||
def option_context(*args) -> Generator[None]:
|
||||
"""
|
||||
Context manager to temporarily set options in a ``with`` statement.
|
||||
|
||||
This method allows users to set one or more pandas options temporarily
|
||||
within a controlled block. The previous options' values are restored
|
||||
once the block is exited. This is useful when making temporary adjustments
|
||||
to pandas' behavior without affecting the global state.
|
||||
|
||||
Parameters
|
||||
----------
|
||||
*args : str | object | dict
|
||||
An even amount of arguments provided in pairs which will be
|
||||
interpreted as (pattern, value) pairs. Alternatively, a single
|
||||
dictionary of {pattern: value} may be provided.
|
||||
|
||||
Returns
|
||||
-------
|
||||
None
|
||||
No return value.
|
||||
|
||||
Yields
|
||||
------
|
||||
None
|
||||
No yield value.
|
||||
|
||||
See Also
|
||||
--------
|
||||
get_option : Retrieve the value of the specified option.
|
||||
set_option : Set the value of the specified option.
|
||||
reset_option : Reset one or more options to their default value.
|
||||
describe_option : Print the description for one or more registered options.
|
||||
|
||||
Notes
|
||||
-----
|
||||
For all available options, please view the :ref:`User Guide <options.available>`
|
||||
or use ``pandas.describe_option()``.
|
||||
|
||||
Examples
|
||||
--------
|
||||
>>> from pandas import option_context
|
||||
>>> with option_context("display.max_rows", 10, "display.max_columns", 5):
|
||||
... pass
|
||||
>>> with option_context({"display.max_rows": 10, "display.max_columns": 5}):
|
||||
... pass
|
||||
"""
|
||||
if len(args) == 1 and isinstance(args[0], dict):
|
||||
args = tuple(kv for item in args[0].items() for kv in item)
|
||||
|
||||
if len(args) % 2 != 0 or len(args) < 2:
|
||||
raise ValueError(
|
||||
"Provide an even amount of arguments as "
|
||||
"option_context(pat, val, pat, val...)."
|
||||
)
|
||||
|
||||
ops = tuple(zip(args[::2], args[1::2], strict=True))
|
||||
undo: tuple[tuple[Any, Any], ...] = ()
|
||||
try:
|
||||
undo = tuple((pat, get_option(pat)) for pat, val in ops)
|
||||
for pat, val in ops:
|
||||
set_option(pat, val)
|
||||
yield
|
||||
finally:
|
||||
for pat, val in undo:
|
||||
set_option(pat, val)
|
||||
|
||||
|
||||
def register_option(
|
||||
key: str,
|
||||
defval: object,
|
||||
doc: str = "",
|
||||
validator: Callable[[object], Any] | None = None,
|
||||
cb: Callable[[str], Any] | None = None,
|
||||
) -> None:
|
||||
"""
|
||||
Register an option in the package-wide pandas config object
|
||||
|
||||
Parameters
|
||||
----------
|
||||
key : str
|
||||
Fully-qualified key, e.g. "x.y.option - z".
|
||||
defval : object
|
||||
Default value of the option.
|
||||
doc : str
|
||||
Description of the option.
|
||||
validator : Callable, optional
|
||||
Function of a single argument, should raise `ValueError` if
|
||||
called with a value which is not a legal value for the option.
|
||||
cb
|
||||
a function of a single argument "key", which is called
|
||||
immediately after an option value is set/reset. key is
|
||||
the full name of the option.
|
||||
|
||||
Raises
|
||||
------
|
||||
ValueError if `validator` is specified and `defval` is not a valid value.
|
||||
|
||||
"""
|
||||
import keyword
|
||||
import tokenize
|
||||
|
||||
key = key.lower()
|
||||
|
||||
if key in _registered_options:
|
||||
raise OptionError(f"Option '{key}' has already been registered")
|
||||
if key in _reserved_keys:
|
||||
raise OptionError(f"Option '{key}' is a reserved key")
|
||||
|
||||
# the default value should be legal
|
||||
if validator:
|
||||
validator(defval)
|
||||
|
||||
# walk the nested dict, creating dicts as needed along the path
|
||||
path = key.split(".")
|
||||
|
||||
for k in path:
|
||||
if not re.match("^" + tokenize.Name + "$", k):
|
||||
raise ValueError(f"{k} is not a valid identifier")
|
||||
if keyword.iskeyword(k):
|
||||
raise ValueError(f"{k} is a python keyword")
|
||||
|
||||
cursor = _global_config
|
||||
msg = "Path prefix to option '{option}' is already an option"
|
||||
|
||||
for i, p in enumerate(path[:-1]):
|
||||
if not isinstance(cursor, dict):
|
||||
raise OptionError(msg.format(option=".".join(path[:i])))
|
||||
if p not in cursor:
|
||||
cursor[p] = {}
|
||||
cursor = cursor[p]
|
||||
|
||||
if not isinstance(cursor, dict):
|
||||
raise OptionError(msg.format(option=".".join(path[:-1])))
|
||||
|
||||
cursor[path[-1]] = defval # initialize
|
||||
|
||||
# save the option metadata
|
||||
_registered_options[key] = RegisteredOption(
|
||||
key=key, defval=defval, doc=doc, validator=validator, cb=cb
|
||||
)
|
||||
|
||||
|
||||
def deprecate_option(
|
||||
key: str,
|
||||
category: type[Warning],
|
||||
msg: str | None = None,
|
||||
rkey: str | None = None,
|
||||
removal_ver: str | None = None,
|
||||
) -> None:
|
||||
"""
|
||||
Mark option `key` as deprecated, if code attempts to access this option,
|
||||
a warning will be produced, using `msg` if given, or a default message
|
||||
if not.
|
||||
if `rkey` is given, any access to the key will be re-routed to `rkey`.
|
||||
|
||||
Neither the existence of `key` nor that if `rkey` is checked. If they
|
||||
do not exist, any subsequence access will fail as usual, after the
|
||||
deprecation warning is given.
|
||||
|
||||
Parameters
|
||||
----------
|
||||
key : str
|
||||
Name of the option to be deprecated.
|
||||
must be a fully-qualified option name (e.g "x.y.z.rkey").
|
||||
category : Warning
|
||||
Warning class for the deprecation.
|
||||
msg : str, optional
|
||||
Warning message to output when the key is referenced.
|
||||
if no message is given a default message will be emitted.
|
||||
rkey : str, optional
|
||||
Name of an option to reroute access to.
|
||||
If specified, any referenced `key` will be
|
||||
re-routed to `rkey` including set/get/reset.
|
||||
rkey must be a fully-qualified option name (e.g "x.y.z.rkey").
|
||||
used by the default message if no `msg` is specified.
|
||||
removal_ver : str, optional
|
||||
Specifies the version in which this option will
|
||||
be removed. used by the default message if no `msg` is specified.
|
||||
|
||||
Raises
|
||||
------
|
||||
OptionError
|
||||
If the specified key has already been deprecated.
|
||||
"""
|
||||
key = key.lower()
|
||||
|
||||
if key in _deprecated_options:
|
||||
raise OptionError(f"Option '{key}' has already been defined as deprecated.")
|
||||
|
||||
_deprecated_options[key] = DeprecatedOption(key, category, msg, rkey, removal_ver)
|
||||
|
||||
|
||||
#
|
||||
# functions internal to the module
|
||||
|
||||
|
||||
def _select_options(pat: str) -> list[str]:
|
||||
"""
|
||||
returns a list of keys matching `pat`
|
||||
|
||||
if pat=="all", returns all registered options
|
||||
"""
|
||||
# short-circuit for exact key
|
||||
if pat in _registered_options:
|
||||
return [pat]
|
||||
|
||||
# else look through all of them
|
||||
keys = sorted(_registered_options.keys())
|
||||
if pat == "all": # reserved key
|
||||
return keys
|
||||
|
||||
return [k for k in keys if re.search(pat, k, re.I)]
|
||||
|
||||
|
||||
def _get_root(key: str) -> tuple[dict[str, Any], str]:
|
||||
path = key.split(".")
|
||||
cursor = _global_config
|
||||
for p in path[:-1]:
|
||||
cursor = cursor[p]
|
||||
return cursor, path[-1]
|
||||
|
||||
|
||||
def _get_deprecated_option(key: str):
|
||||
"""
|
||||
Retrieves the metadata for a deprecated option, if `key` is deprecated.
|
||||
|
||||
Returns
|
||||
-------
|
||||
DeprecatedOption (namedtuple) if key is deprecated, None otherwise
|
||||
"""
|
||||
try:
|
||||
d = _deprecated_options[key]
|
||||
except KeyError:
|
||||
return None
|
||||
else:
|
||||
return d
|
||||
|
||||
|
||||
def _get_registered_option(key: str):
|
||||
"""
|
||||
Retrieves the option metadata if `key` is a registered option.
|
||||
|
||||
Returns
|
||||
-------
|
||||
RegisteredOption (namedtuple) if key is deprecated, None otherwise
|
||||
"""
|
||||
return _registered_options.get(key)
|
||||
|
||||
|
||||
def _translate_key(key: str) -> str:
|
||||
"""
|
||||
if `key` is deprecated and a replacement key defined, will return the
|
||||
replacement key, otherwise returns `key` as-is
|
||||
"""
|
||||
d = _get_deprecated_option(key)
|
||||
if d:
|
||||
return d.rkey or key
|
||||
else:
|
||||
return key
|
||||
|
||||
|
||||
def _warn_if_deprecated(key: str) -> bool:
|
||||
"""
|
||||
Checks if `key` is a deprecated option and if so, prints a warning.
|
||||
|
||||
Returns
|
||||
-------
|
||||
bool - True if `key` is deprecated, False otherwise.
|
||||
"""
|
||||
d = _get_deprecated_option(key)
|
||||
if d:
|
||||
if d.msg:
|
||||
warnings.warn(
|
||||
d.msg,
|
||||
d.category,
|
||||
stacklevel=find_stack_level(),
|
||||
)
|
||||
else:
|
||||
msg = f"'{key}' is deprecated"
|
||||
if d.removal_ver:
|
||||
msg += f" and will be removed in {d.removal_ver}"
|
||||
if d.rkey:
|
||||
msg += f", please use '{d.rkey}' instead."
|
||||
else:
|
||||
msg += ", please refrain from using it."
|
||||
|
||||
warnings.warn(
|
||||
msg,
|
||||
d.category,
|
||||
stacklevel=find_stack_level(),
|
||||
)
|
||||
return True
|
||||
return False
|
||||
|
||||
|
||||
def _build_option_description(k: str) -> str:
|
||||
"""Builds a formatted description of a registered option and prints it"""
|
||||
o = _get_registered_option(k)
|
||||
d = _get_deprecated_option(k)
|
||||
|
||||
s = f"{k} "
|
||||
|
||||
if o.doc:
|
||||
s += "\n".join(o.doc.strip().split("\n"))
|
||||
else:
|
||||
s += "No description available."
|
||||
|
||||
if o:
|
||||
with warnings.catch_warnings():
|
||||
warnings.simplefilter("ignore", FutureWarning)
|
||||
warnings.simplefilter("ignore", DeprecationWarning)
|
||||
s += f"\n [default: {o.defval}] [currently: {get_option(k)}]"
|
||||
|
||||
if d:
|
||||
rkey = d.rkey or ""
|
||||
s += "\n (Deprecated"
|
||||
s += f", use `{rkey}` instead."
|
||||
s += ")"
|
||||
|
||||
return s
|
||||
|
||||
|
||||
# helpers
|
||||
|
||||
|
||||
@contextmanager
|
||||
def config_prefix(prefix: str) -> Generator[None]:
|
||||
"""
|
||||
contextmanager for multiple invocations of API with a common prefix
|
||||
|
||||
supported API functions: (register / get / set )__option
|
||||
|
||||
Warning: This is not thread - safe, and won't work properly if you import
|
||||
the API functions into your module using the "from x import y" construct.
|
||||
|
||||
Example
|
||||
-------
|
||||
import pandas._config.config as cf
|
||||
with cf.config_prefix("display.font"):
|
||||
cf.register_option("color", "red")
|
||||
cf.register_option("size", " 5 pt")
|
||||
cf.set_option(size, " 6 pt")
|
||||
cf.get_option(size)
|
||||
...
|
||||
|
||||
etc'
|
||||
|
||||
will register options "display.font.color", "display.font.size", set the
|
||||
value of "display.font.size"... and so on.
|
||||
"""
|
||||
# Note: reset_option relies on set_option, and on key directly
|
||||
# it does not fit in to this monkey-patching scheme
|
||||
|
||||
global register_option, get_option, set_option
|
||||
|
||||
def wrap(func: F) -> F:
|
||||
def inner(key: str, *args, **kwds):
|
||||
pkey = f"{prefix}.{key}"
|
||||
return func(pkey, *args, **kwds)
|
||||
|
||||
return cast(F, inner)
|
||||
|
||||
_register_option = register_option
|
||||
_get_option = get_option
|
||||
_set_option = set_option
|
||||
set_option = wrap(set_option)
|
||||
get_option = wrap(get_option)
|
||||
register_option = wrap(register_option)
|
||||
try:
|
||||
yield
|
||||
finally:
|
||||
set_option = _set_option
|
||||
get_option = _get_option
|
||||
register_option = _register_option
|
||||
|
||||
|
||||
# These factories and methods are handy for use as the validator
|
||||
# arg in register_option
|
||||
|
||||
|
||||
def is_type_factory(_type: type[Any]) -> Callable[[Any], None]:
|
||||
"""
|
||||
|
||||
Parameters
|
||||
----------
|
||||
`_type` - a type to be compared against (e.g. type(x) == `_type`)
|
||||
|
||||
Returns
|
||||
-------
|
||||
validator - a function of a single argument x , which raises
|
||||
ValueError if type(x) is not equal to `_type`
|
||||
|
||||
"""
|
||||
|
||||
def inner(x) -> None:
|
||||
if type(x) != _type:
|
||||
raise ValueError(f"Value must have type '{_type}'")
|
||||
|
||||
return inner
|
||||
|
||||
|
||||
def is_instance_factory(_type: type | tuple[type, ...]) -> Callable[[Any], None]:
|
||||
"""
|
||||
|
||||
Parameters
|
||||
----------
|
||||
`_type` - the type to be checked against
|
||||
|
||||
Returns
|
||||
-------
|
||||
validator - a function of a single argument x , which raises
|
||||
ValueError if x is not an instance of `_type`
|
||||
|
||||
"""
|
||||
if isinstance(_type, tuple):
|
||||
type_repr = "|".join(map(str, _type))
|
||||
else:
|
||||
type_repr = f"'{_type}'"
|
||||
|
||||
def inner(x) -> None:
|
||||
if not isinstance(x, _type):
|
||||
raise ValueError(f"Value must be an instance of {type_repr}")
|
||||
|
||||
return inner
|
||||
|
||||
|
||||
def is_one_of_factory(legal_values: Sequence) -> Callable[[Any], None]:
|
||||
callables = [c for c in legal_values if callable(c)]
|
||||
legal_values = [c for c in legal_values if not callable(c)]
|
||||
|
||||
def inner(x) -> None:
|
||||
if x not in legal_values:
|
||||
if not any(c(x) for c in callables):
|
||||
uvals = [str(lval) for lval in legal_values]
|
||||
pp_values = "|".join(uvals)
|
||||
msg = f"Value must be one of {pp_values}"
|
||||
if len(callables):
|
||||
msg += " or a callable"
|
||||
raise ValueError(msg)
|
||||
|
||||
return inner
|
||||
|
||||
|
||||
def is_nonnegative_int(value: object) -> None:
|
||||
"""
|
||||
Verify that value is None or a positive int.
|
||||
|
||||
Parameters
|
||||
----------
|
||||
value : None or int
|
||||
The `value` to be checked.
|
||||
|
||||
Raises
|
||||
------
|
||||
ValueError
|
||||
When the value is not None or is a negative integer
|
||||
"""
|
||||
if value is None:
|
||||
return
|
||||
|
||||
elif isinstance(value, int):
|
||||
if value >= 0:
|
||||
return
|
||||
|
||||
msg = "Value must be a nonnegative integer or None"
|
||||
raise ValueError(msg)
|
||||
|
||||
|
||||
# common type validators, for convenience
|
||||
# usage: register_option(... , validator = is_int)
|
||||
is_int = is_type_factory(int)
|
||||
is_bool = is_type_factory(bool)
|
||||
is_float = is_type_factory(float)
|
||||
is_str = is_type_factory(str)
|
||||
is_text = is_instance_factory((str, bytes))
|
||||
|
||||
|
||||
def is_callable(obj: object) -> bool:
|
||||
"""
|
||||
|
||||
Parameters
|
||||
----------
|
||||
`obj` - the object to be checked
|
||||
|
||||
Returns
|
||||
-------
|
||||
validator - returns True if object is callable
|
||||
raises ValueError otherwise.
|
||||
|
||||
"""
|
||||
if not callable(obj):
|
||||
raise ValueError("Value must be a callable")
|
||||
return True
|
||||
|
||||
|
||||
# import set_module here would cause circular import
|
||||
get_option.__module__ = "pandas"
|
||||
set_option.__module__ = "pandas"
|
||||
describe_option.__module__ = "pandas"
|
||||
reset_option.__module__ = "pandas"
|
||||
option_context.__module__ = "pandas"
|
||||
26
venv/Lib/site-packages/pandas/_config/dates.py
Normal file
26
venv/Lib/site-packages/pandas/_config/dates.py
Normal file
@@ -0,0 +1,26 @@
|
||||
"""
|
||||
config for datetime formatting
|
||||
"""
|
||||
|
||||
from __future__ import annotations
|
||||
|
||||
from pandas._config import config as cf
|
||||
|
||||
pc_date_dayfirst_doc = """
|
||||
: boolean
|
||||
When True, prints and parses dates with the day first, eg 20/01/2005
|
||||
"""
|
||||
|
||||
pc_date_yearfirst_doc = """
|
||||
: boolean
|
||||
When True, prints and parses dates with the year first, eg 2005/01/20
|
||||
"""
|
||||
|
||||
with cf.config_prefix("display"):
|
||||
# Needed upstream of `_libs` because these are used in tslibs.parsing
|
||||
cf.register_option(
|
||||
"date_dayfirst", False, pc_date_dayfirst_doc, validator=cf.is_bool
|
||||
)
|
||||
cf.register_option(
|
||||
"date_yearfirst", False, pc_date_yearfirst_doc, validator=cf.is_bool
|
||||
)
|
||||
62
venv/Lib/site-packages/pandas/_config/display.py
Normal file
62
venv/Lib/site-packages/pandas/_config/display.py
Normal file
@@ -0,0 +1,62 @@
|
||||
"""
|
||||
Unopinionated display configuration.
|
||||
"""
|
||||
|
||||
from __future__ import annotations
|
||||
|
||||
import locale
|
||||
import sys
|
||||
|
||||
from pandas._config import config as cf
|
||||
|
||||
# -----------------------------------------------------------------------------
|
||||
# Global formatting options
|
||||
_initial_defencoding: str | None = None
|
||||
|
||||
|
||||
def detect_console_encoding() -> str:
|
||||
"""
|
||||
Try to find the most capable encoding supported by the console.
|
||||
slightly modified from the way IPython handles the same issue.
|
||||
"""
|
||||
global _initial_defencoding
|
||||
|
||||
encoding = None
|
||||
try:
|
||||
encoding = sys.stdout.encoding or sys.stdin.encoding
|
||||
except (AttributeError, OSError):
|
||||
pass
|
||||
|
||||
# try again for something better
|
||||
if not encoding or "ascii" in encoding.lower():
|
||||
try:
|
||||
encoding = locale.getpreferredencoding()
|
||||
except locale.Error:
|
||||
# can be raised by locale.setlocale(), which is
|
||||
# called by getpreferredencoding
|
||||
# (on some systems, see stdlib locale docs)
|
||||
pass
|
||||
|
||||
# when all else fails. this will usually be "ascii"
|
||||
if not encoding or "ascii" in encoding.lower():
|
||||
encoding = sys.getdefaultencoding()
|
||||
|
||||
# GH#3360, save the reported defencoding at import time
|
||||
# MPL backends may change it. Make available for debugging.
|
||||
if not _initial_defencoding:
|
||||
_initial_defencoding = sys.getdefaultencoding()
|
||||
|
||||
return encoding
|
||||
|
||||
|
||||
pc_encoding_doc = """
|
||||
: str/unicode
|
||||
Defaults to the detected encoding of the console.
|
||||
Specifies the encoding to be used for strings returned by to_string,
|
||||
these are generally strings meant to be displayed on the console.
|
||||
"""
|
||||
|
||||
with cf.config_prefix("display"):
|
||||
cf.register_option(
|
||||
"encoding", detect_console_encoding(), pc_encoding_doc, validator=cf.is_text
|
||||
)
|
||||
176
venv/Lib/site-packages/pandas/_config/localization.py
Normal file
176
venv/Lib/site-packages/pandas/_config/localization.py
Normal file
@@ -0,0 +1,176 @@
|
||||
"""
|
||||
Helpers for configuring locale settings.
|
||||
|
||||
Name `localization` is chosen to avoid overlap with builtin `locale` module.
|
||||
"""
|
||||
|
||||
from __future__ import annotations
|
||||
|
||||
from contextlib import contextmanager
|
||||
import locale
|
||||
import platform
|
||||
import re
|
||||
import subprocess
|
||||
from typing import (
|
||||
TYPE_CHECKING,
|
||||
cast,
|
||||
)
|
||||
|
||||
from pandas._config.config import options
|
||||
|
||||
if TYPE_CHECKING:
|
||||
from collections.abc import Generator
|
||||
|
||||
|
||||
@contextmanager
|
||||
def set_locale(
|
||||
new_locale: str | tuple[str, str], lc_var: int = locale.LC_ALL
|
||||
) -> Generator[str | tuple[str, str]]:
|
||||
"""
|
||||
Context manager for temporarily setting a locale.
|
||||
|
||||
Parameters
|
||||
----------
|
||||
new_locale : str or tuple
|
||||
A string of the form <language_country>.<encoding>. For example to set
|
||||
the current locale to US English with a UTF8 encoding, you would pass
|
||||
"en_US.UTF-8".
|
||||
lc_var : int, default `locale.LC_ALL`
|
||||
The category of the locale being set.
|
||||
|
||||
Notes
|
||||
-----
|
||||
This is useful when you want to run a particular block of code under a
|
||||
particular locale, without globally setting the locale. This probably isn't
|
||||
thread-safe.
|
||||
"""
|
||||
# getlocale is not always compliant with setlocale, use setlocale. GH#46595
|
||||
current_locale = locale.setlocale(lc_var)
|
||||
|
||||
try:
|
||||
locale.setlocale(lc_var, new_locale)
|
||||
normalized_code, normalized_encoding = locale.getlocale()
|
||||
if normalized_code is not None and normalized_encoding is not None:
|
||||
yield f"{normalized_code}.{normalized_encoding}"
|
||||
else:
|
||||
yield new_locale
|
||||
finally:
|
||||
locale.setlocale(lc_var, current_locale)
|
||||
|
||||
|
||||
def can_set_locale(lc: str, lc_var: int = locale.LC_ALL) -> bool:
|
||||
"""
|
||||
Check to see if we can set a locale, and subsequently get the locale,
|
||||
without raising an Exception.
|
||||
|
||||
Parameters
|
||||
----------
|
||||
lc : str
|
||||
The locale to attempt to set.
|
||||
lc_var : int, default `locale.LC_ALL`
|
||||
The category of the locale being set.
|
||||
|
||||
Returns
|
||||
-------
|
||||
bool
|
||||
Whether the passed locale can be set
|
||||
"""
|
||||
try:
|
||||
with set_locale(lc, lc_var=lc_var):
|
||||
pass
|
||||
except (ValueError, locale.Error):
|
||||
# horrible name for an Exception subclass
|
||||
return False
|
||||
else:
|
||||
return True
|
||||
|
||||
|
||||
def _valid_locales(locales: list[str] | str, normalize: bool) -> list[str]:
|
||||
"""
|
||||
Return a list of normalized locales that do not throw an ``Exception``
|
||||
when set.
|
||||
|
||||
Parameters
|
||||
----------
|
||||
locales : str
|
||||
A string where each locale is separated by a newline.
|
||||
normalize : bool
|
||||
Whether to call ``locale.normalize`` on each locale.
|
||||
|
||||
Returns
|
||||
-------
|
||||
valid_locales : list
|
||||
A list of valid locales.
|
||||
"""
|
||||
return [
|
||||
loc
|
||||
for loc in (
|
||||
locale.normalize(loc.strip()) if normalize else loc.strip()
|
||||
for loc in locales
|
||||
)
|
||||
if can_set_locale(loc)
|
||||
]
|
||||
|
||||
|
||||
def get_locales(
|
||||
prefix: str | None = None,
|
||||
normalize: bool = True,
|
||||
) -> list[str]:
|
||||
"""
|
||||
Get all the locales that are available on the system.
|
||||
|
||||
Parameters
|
||||
----------
|
||||
prefix : str
|
||||
If not ``None`` then return only those locales with the prefix
|
||||
provided. For example to get all English language locales (those that
|
||||
start with ``"en"``), pass ``prefix="en"``.
|
||||
normalize : bool
|
||||
Call ``locale.normalize`` on the resulting list of available locales.
|
||||
If ``True``, only locales that can be set without throwing an
|
||||
``Exception`` are returned.
|
||||
|
||||
Returns
|
||||
-------
|
||||
locales : list of strings
|
||||
A list of locale strings that can be set with ``locale.setlocale()``.
|
||||
For example::
|
||||
|
||||
locale.setlocale(locale.LC_ALL, locale_string)
|
||||
|
||||
On error will return an empty list (no locale available, e.g. Windows)
|
||||
|
||||
"""
|
||||
if platform.system() in ("Linux", "Darwin"):
|
||||
raw_locales = subprocess.check_output(["locale", "-a"])
|
||||
else:
|
||||
# Other platforms e.g. windows platforms don't define "locale -a"
|
||||
# Note: is_platform_windows causes circular import here
|
||||
return []
|
||||
|
||||
try:
|
||||
# raw_locales is "\n" separated list of locales
|
||||
# it may contain non-decodable parts, so split
|
||||
# extract what we can and then rejoin.
|
||||
split_raw_locales = raw_locales.split(b"\n")
|
||||
out_locales = []
|
||||
for x in split_raw_locales:
|
||||
try:
|
||||
out_locales.append(str(x, encoding=cast(str, options.display.encoding)))
|
||||
except UnicodeError:
|
||||
# 'locale -a' is used to populated 'raw_locales' and on
|
||||
# Redhat 7 Linux (and maybe others) prints locale names
|
||||
# using windows-1252 encoding. Bug only triggered by
|
||||
# a few special characters and when there is an
|
||||
# extensive list of installed locales.
|
||||
out_locales.append(str(x, encoding="windows-1252"))
|
||||
|
||||
except TypeError:
|
||||
pass
|
||||
|
||||
if prefix is None:
|
||||
return _valid_locales(out_locales, normalize)
|
||||
|
||||
pattern = re.compile(f"{prefix}.*")
|
||||
found = pattern.findall("\n".join(out_locales))
|
||||
return _valid_locales(found, normalize)
|
||||
27
venv/Lib/site-packages/pandas/_libs/__init__.py
Normal file
27
venv/Lib/site-packages/pandas/_libs/__init__.py
Normal file
@@ -0,0 +1,27 @@
|
||||
__all__ = [
|
||||
"Interval",
|
||||
"NaT",
|
||||
"NaTType",
|
||||
"OutOfBoundsDatetime",
|
||||
"Period",
|
||||
"Timedelta",
|
||||
"Timestamp",
|
||||
"iNaT",
|
||||
]
|
||||
|
||||
|
||||
# Below imports needs to happen first to ensure pandas top level
|
||||
# module gets monkeypatched with the pandas_datetime_CAPI
|
||||
# see pandas_datetime_exec in pd_datetime.c
|
||||
import pandas._libs.pandas_parser # isort: skip # type: ignore[reportUnusedImport]
|
||||
import pandas._libs.pandas_datetime # noqa: F401 # isort: skip # type: ignore[reportUnusedImport]
|
||||
from pandas._libs.interval import Interval
|
||||
from pandas._libs.tslibs import (
|
||||
NaT,
|
||||
NaTType,
|
||||
OutOfBoundsDatetime,
|
||||
Period,
|
||||
Timedelta,
|
||||
Timestamp,
|
||||
iNaT,
|
||||
)
|
||||
Binary file not shown.
Binary file not shown.
Binary file not shown.
BIN
venv/Lib/site-packages/pandas/_libs/algos.cp311-win_amd64.lib
Normal file
BIN
venv/Lib/site-packages/pandas/_libs/algos.cp311-win_amd64.lib
Normal file
Binary file not shown.
BIN
venv/Lib/site-packages/pandas/_libs/algos.cp311-win_amd64.pyd
Normal file
BIN
venv/Lib/site-packages/pandas/_libs/algos.cp311-win_amd64.pyd
Normal file
Binary file not shown.
443
venv/Lib/site-packages/pandas/_libs/algos.pyi
Normal file
443
venv/Lib/site-packages/pandas/_libs/algos.pyi
Normal file
@@ -0,0 +1,443 @@
|
||||
from typing import Any
|
||||
|
||||
import numpy as np
|
||||
|
||||
from pandas._typing import npt
|
||||
|
||||
class Infinity:
|
||||
def __eq__(self, other) -> bool: ...
|
||||
def __ne__(self, other) -> bool: ...
|
||||
def __lt__(self, other) -> bool: ...
|
||||
def __le__(self, other) -> bool: ...
|
||||
def __gt__(self, other) -> bool: ...
|
||||
def __ge__(self, other) -> bool: ...
|
||||
|
||||
class NegInfinity:
|
||||
def __eq__(self, other) -> bool: ...
|
||||
def __ne__(self, other) -> bool: ...
|
||||
def __lt__(self, other) -> bool: ...
|
||||
def __le__(self, other) -> bool: ...
|
||||
def __gt__(self, other) -> bool: ...
|
||||
def __ge__(self, other) -> bool: ...
|
||||
|
||||
def unique_deltas(
|
||||
arr: np.ndarray, # const int64_t[:]
|
||||
) -> np.ndarray: ... # np.ndarray[np.int64, ndim=1]
|
||||
def is_lexsorted(list_of_arrays: list[npt.NDArray[np.int64]]) -> bool: ...
|
||||
def groupsort_indexer(
|
||||
index: np.ndarray, # const int64_t[:]
|
||||
ngroups: int,
|
||||
) -> tuple[
|
||||
np.ndarray, # ndarray[int64_t, ndim=1]
|
||||
np.ndarray, # ndarray[int64_t, ndim=1]
|
||||
]: ...
|
||||
def kth_smallest(
|
||||
arr: np.ndarray, # numeric[:]
|
||||
k: int,
|
||||
) -> Any: ... # numeric
|
||||
|
||||
# ----------------------------------------------------------------------
|
||||
# Pairwise correlation/covariance
|
||||
|
||||
def nancorr(
|
||||
mat: npt.NDArray[np.float64], # const float64_t[:, :]
|
||||
cov: bool = ...,
|
||||
minp: int | None = ...,
|
||||
) -> npt.NDArray[np.float64]: ... # ndarray[float64_t, ndim=2]
|
||||
def nancorr_spearman(
|
||||
mat: npt.NDArray[np.float64], # ndarray[float64_t, ndim=2]
|
||||
minp: int = ...,
|
||||
) -> npt.NDArray[np.float64]: ... # ndarray[float64_t, ndim=2]
|
||||
|
||||
# ----------------------------------------------------------------------
|
||||
|
||||
def validate_limit(nobs: int | None, limit=...) -> int: ...
|
||||
def get_fill_indexer(
|
||||
mask: npt.NDArray[np.bool_],
|
||||
limit: int | None = None,
|
||||
) -> npt.NDArray[np.intp]: ...
|
||||
def pad(
|
||||
old: np.ndarray, # ndarray[numeric_object_t]
|
||||
new: np.ndarray, # ndarray[numeric_object_t]
|
||||
limit=...,
|
||||
) -> npt.NDArray[np.intp]: ... # np.ndarray[np.intp, ndim=1]
|
||||
def pad_inplace(
|
||||
values: np.ndarray, # numeric_object_t[:]
|
||||
mask: np.ndarray, # uint8_t[:]
|
||||
limit=...,
|
||||
) -> None: ...
|
||||
def pad_2d_inplace(
|
||||
values: np.ndarray, # numeric_object_t[:, :]
|
||||
mask: np.ndarray, # const uint8_t[:, :]
|
||||
limit=...,
|
||||
) -> None: ...
|
||||
def backfill(
|
||||
old: np.ndarray, # ndarray[numeric_object_t]
|
||||
new: np.ndarray, # ndarray[numeric_object_t]
|
||||
limit=...,
|
||||
) -> npt.NDArray[np.intp]: ... # np.ndarray[np.intp, ndim=1]
|
||||
def backfill_inplace(
|
||||
values: np.ndarray, # numeric_object_t[:]
|
||||
mask: np.ndarray, # uint8_t[:]
|
||||
limit=...,
|
||||
) -> None: ...
|
||||
def backfill_2d_inplace(
|
||||
values: np.ndarray, # numeric_object_t[:, :]
|
||||
mask: np.ndarray, # const uint8_t[:, :]
|
||||
limit=...,
|
||||
) -> None: ...
|
||||
def is_monotonic(
|
||||
arr: np.ndarray, # ndarray[numeric_object_t, ndim=1]
|
||||
timelike: bool,
|
||||
) -> tuple[bool, bool, bool]: ...
|
||||
|
||||
# ----------------------------------------------------------------------
|
||||
# rank_1d, rank_2d
|
||||
# ----------------------------------------------------------------------
|
||||
|
||||
def rank_1d(
|
||||
values: np.ndarray, # ndarray[numeric_object_t, ndim=1]
|
||||
labels: np.ndarray | None = ..., # const int64_t[:]=None
|
||||
is_datetimelike: bool = ...,
|
||||
ties_method=...,
|
||||
ascending: bool = ...,
|
||||
pct: bool = ...,
|
||||
na_option=...,
|
||||
mask: npt.NDArray[np.bool_] | None = ...,
|
||||
) -> np.ndarray: ... # np.ndarray[float64_t, ndim=1]
|
||||
def rank_2d(
|
||||
in_arr: np.ndarray, # ndarray[numeric_object_t, ndim=2]
|
||||
axis: int = ...,
|
||||
is_datetimelike: bool = ...,
|
||||
ties_method=...,
|
||||
ascending: bool = ...,
|
||||
na_option=...,
|
||||
pct: bool = ...,
|
||||
) -> np.ndarray: ... # np.ndarray[float64_t, ndim=1]
|
||||
def diff_2d(
|
||||
arr: np.ndarray, # ndarray[diff_t, ndim=2]
|
||||
out: np.ndarray, # ndarray[out_t, ndim=2]
|
||||
periods: int,
|
||||
axis: int,
|
||||
datetimelike: bool = ...,
|
||||
) -> None: ...
|
||||
def ensure_platform_int(arr: object) -> npt.NDArray[np.intp]: ...
|
||||
def ensure_object(arr: object) -> npt.NDArray[np.object_]: ...
|
||||
def ensure_float64(arr: object) -> npt.NDArray[np.float64]: ...
|
||||
def ensure_int8(arr: object) -> npt.NDArray[np.int8]: ...
|
||||
def ensure_int16(arr: object) -> npt.NDArray[np.int16]: ...
|
||||
def ensure_int32(arr: object) -> npt.NDArray[np.int32]: ...
|
||||
def ensure_int64(arr: object) -> npt.NDArray[np.int64]: ...
|
||||
def ensure_uint64(arr: object) -> npt.NDArray[np.uint64]: ...
|
||||
def take_1d_int8_int8(
|
||||
values: np.ndarray, indexer: npt.NDArray[np.intp], out: np.ndarray, fill_value=...
|
||||
) -> None: ...
|
||||
def take_1d_int8_int32(
|
||||
values: np.ndarray, indexer: npt.NDArray[np.intp], out: np.ndarray, fill_value=...
|
||||
) -> None: ...
|
||||
def take_1d_int8_int64(
|
||||
values: np.ndarray, indexer: npt.NDArray[np.intp], out: np.ndarray, fill_value=...
|
||||
) -> None: ...
|
||||
def take_1d_int8_float64(
|
||||
values: np.ndarray, indexer: npt.NDArray[np.intp], out: np.ndarray, fill_value=...
|
||||
) -> None: ...
|
||||
def take_1d_int16_int16(
|
||||
values: np.ndarray, indexer: npt.NDArray[np.intp], out: np.ndarray, fill_value=...
|
||||
) -> None: ...
|
||||
def take_1d_int16_int32(
|
||||
values: np.ndarray, indexer: npt.NDArray[np.intp], out: np.ndarray, fill_value=...
|
||||
) -> None: ...
|
||||
def take_1d_int16_int64(
|
||||
values: np.ndarray, indexer: npt.NDArray[np.intp], out: np.ndarray, fill_value=...
|
||||
) -> None: ...
|
||||
def take_1d_int16_float64(
|
||||
values: np.ndarray, indexer: npt.NDArray[np.intp], out: np.ndarray, fill_value=...
|
||||
) -> None: ...
|
||||
def take_1d_int32_int32(
|
||||
values: np.ndarray, indexer: npt.NDArray[np.intp], out: np.ndarray, fill_value=...
|
||||
) -> None: ...
|
||||
def take_1d_int32_int64(
|
||||
values: np.ndarray, indexer: npt.NDArray[np.intp], out: np.ndarray, fill_value=...
|
||||
) -> None: ...
|
||||
def take_1d_int32_float64(
|
||||
values: np.ndarray, indexer: npt.NDArray[np.intp], out: np.ndarray, fill_value=...
|
||||
) -> None: ...
|
||||
def take_1d_int64_int64(
|
||||
values: np.ndarray, indexer: npt.NDArray[np.intp], out: np.ndarray, fill_value=...
|
||||
) -> None: ...
|
||||
def take_1d_uint16_uint16(
|
||||
values: np.ndarray, indexer: npt.NDArray[np.intp], out: np.ndarray, fill_value=...
|
||||
) -> None: ...
|
||||
def take_1d_uint32_uint32(
|
||||
values: np.ndarray, indexer: npt.NDArray[np.intp], out: np.ndarray, fill_value=...
|
||||
) -> None: ...
|
||||
def take_1d_uint64_uint64(
|
||||
values: np.ndarray, indexer: npt.NDArray[np.intp], out: np.ndarray, fill_value=...
|
||||
) -> None: ...
|
||||
def take_1d_int64_float64(
|
||||
values: np.ndarray, indexer: npt.NDArray[np.intp], out: np.ndarray, fill_value=...
|
||||
) -> None: ...
|
||||
def take_1d_float32_float32(
|
||||
values: np.ndarray, indexer: npt.NDArray[np.intp], out: np.ndarray, fill_value=...
|
||||
) -> None: ...
|
||||
def take_1d_float32_float64(
|
||||
values: np.ndarray, indexer: npt.NDArray[np.intp], out: np.ndarray, fill_value=...
|
||||
) -> None: ...
|
||||
def take_1d_float64_float64(
|
||||
values: np.ndarray, indexer: npt.NDArray[np.intp], out: np.ndarray, fill_value=...
|
||||
) -> None: ...
|
||||
def take_1d_object_object(
|
||||
values: np.ndarray, indexer: npt.NDArray[np.intp], out: np.ndarray, fill_value=...
|
||||
) -> None: ...
|
||||
def take_1d_bool_bool(
|
||||
values: np.ndarray, indexer: npt.NDArray[np.intp], out: np.ndarray, fill_value=...
|
||||
) -> None: ...
|
||||
def take_1d_bool_object(
|
||||
values: np.ndarray, indexer: npt.NDArray[np.intp], out: np.ndarray, fill_value=...
|
||||
) -> None: ...
|
||||
def take_2d_axis0_int8_int8(
|
||||
values: np.ndarray, indexer: npt.NDArray[np.intp], out: np.ndarray, fill_value=...
|
||||
) -> None: ...
|
||||
def take_2d_axis0_int8_int32(
|
||||
values: np.ndarray, indexer: npt.NDArray[np.intp], out: np.ndarray, fill_value=...
|
||||
) -> None: ...
|
||||
def take_2d_axis0_int8_int64(
|
||||
values: np.ndarray, indexer: npt.NDArray[np.intp], out: np.ndarray, fill_value=...
|
||||
) -> None: ...
|
||||
def take_2d_axis0_int8_float64(
|
||||
values: np.ndarray, indexer: npt.NDArray[np.intp], out: np.ndarray, fill_value=...
|
||||
) -> None: ...
|
||||
def take_2d_axis0_int16_int16(
|
||||
values: np.ndarray, indexer: npt.NDArray[np.intp], out: np.ndarray, fill_value=...
|
||||
) -> None: ...
|
||||
def take_2d_axis0_int16_int32(
|
||||
values: np.ndarray, indexer: npt.NDArray[np.intp], out: np.ndarray, fill_value=...
|
||||
) -> None: ...
|
||||
def take_2d_axis0_int16_int64(
|
||||
values: np.ndarray, indexer: npt.NDArray[np.intp], out: np.ndarray, fill_value=...
|
||||
) -> None: ...
|
||||
def take_2d_axis0_int16_float64(
|
||||
values: np.ndarray, indexer: npt.NDArray[np.intp], out: np.ndarray, fill_value=...
|
||||
) -> None: ...
|
||||
def take_2d_axis0_int32_int32(
|
||||
values: np.ndarray, indexer: npt.NDArray[np.intp], out: np.ndarray, fill_value=...
|
||||
) -> None: ...
|
||||
def take_2d_axis0_int32_int64(
|
||||
values: np.ndarray, indexer: npt.NDArray[np.intp], out: np.ndarray, fill_value=...
|
||||
) -> None: ...
|
||||
def take_2d_axis0_int32_float64(
|
||||
values: np.ndarray, indexer: npt.NDArray[np.intp], out: np.ndarray, fill_value=...
|
||||
) -> None: ...
|
||||
def take_2d_axis0_int64_int64(
|
||||
values: np.ndarray, indexer: npt.NDArray[np.intp], out: np.ndarray, fill_value=...
|
||||
) -> None: ...
|
||||
def take_2d_axis0_int64_float64(
|
||||
values: np.ndarray, indexer: npt.NDArray[np.intp], out: np.ndarray, fill_value=...
|
||||
) -> None: ...
|
||||
def take_2d_axis0_uint16_uint16(
|
||||
values: np.ndarray, indexer: npt.NDArray[np.intp], out: np.ndarray, fill_value=...
|
||||
) -> None: ...
|
||||
def take_2d_axis0_uint32_uint32(
|
||||
values: np.ndarray, indexer: npt.NDArray[np.intp], out: np.ndarray, fill_value=...
|
||||
) -> None: ...
|
||||
def take_2d_axis0_uint64_uint64(
|
||||
values: np.ndarray, indexer: npt.NDArray[np.intp], out: np.ndarray, fill_value=...
|
||||
) -> None: ...
|
||||
def take_2d_axis0_float32_float32(
|
||||
values: np.ndarray, indexer: npt.NDArray[np.intp], out: np.ndarray, fill_value=...
|
||||
) -> None: ...
|
||||
def take_2d_axis0_float32_float64(
|
||||
values: np.ndarray, indexer: npt.NDArray[np.intp], out: np.ndarray, fill_value=...
|
||||
) -> None: ...
|
||||
def take_2d_axis0_float64_float64(
|
||||
values: np.ndarray, indexer: npt.NDArray[np.intp], out: np.ndarray, fill_value=...
|
||||
) -> None: ...
|
||||
def take_2d_axis0_object_object(
|
||||
values: np.ndarray, indexer: npt.NDArray[np.intp], out: np.ndarray, fill_value=...
|
||||
) -> None: ...
|
||||
def take_2d_axis0_bool_bool(
|
||||
values: np.ndarray, indexer: npt.NDArray[np.intp], out: np.ndarray, fill_value=...
|
||||
) -> None: ...
|
||||
def take_2d_axis0_bool_object(
|
||||
values: np.ndarray, indexer: npt.NDArray[np.intp], out: np.ndarray, fill_value=...
|
||||
) -> None: ...
|
||||
def take_2d_axis1_int8_int8(
|
||||
values: np.ndarray, indexer: npt.NDArray[np.intp], out: np.ndarray, fill_value=...
|
||||
) -> None: ...
|
||||
def take_2d_axis1_int8_int32(
|
||||
values: np.ndarray, indexer: npt.NDArray[np.intp], out: np.ndarray, fill_value=...
|
||||
) -> None: ...
|
||||
def take_2d_axis1_int8_int64(
|
||||
values: np.ndarray, indexer: npt.NDArray[np.intp], out: np.ndarray, fill_value=...
|
||||
) -> None: ...
|
||||
def take_2d_axis1_int8_float64(
|
||||
values: np.ndarray, indexer: npt.NDArray[np.intp], out: np.ndarray, fill_value=...
|
||||
) -> None: ...
|
||||
def take_2d_axis1_int16_int16(
|
||||
values: np.ndarray, indexer: npt.NDArray[np.intp], out: np.ndarray, fill_value=...
|
||||
) -> None: ...
|
||||
def take_2d_axis1_int16_int32(
|
||||
values: np.ndarray, indexer: npt.NDArray[np.intp], out: np.ndarray, fill_value=...
|
||||
) -> None: ...
|
||||
def take_2d_axis1_int16_int64(
|
||||
values: np.ndarray, indexer: npt.NDArray[np.intp], out: np.ndarray, fill_value=...
|
||||
) -> None: ...
|
||||
def take_2d_axis1_int16_float64(
|
||||
values: np.ndarray, indexer: npt.NDArray[np.intp], out: np.ndarray, fill_value=...
|
||||
) -> None: ...
|
||||
def take_2d_axis1_int32_int32(
|
||||
values: np.ndarray, indexer: npt.NDArray[np.intp], out: np.ndarray, fill_value=...
|
||||
) -> None: ...
|
||||
def take_2d_axis1_int32_int64(
|
||||
values: np.ndarray, indexer: npt.NDArray[np.intp], out: np.ndarray, fill_value=...
|
||||
) -> None: ...
|
||||
def take_2d_axis1_int32_float64(
|
||||
values: np.ndarray, indexer: npt.NDArray[np.intp], out: np.ndarray, fill_value=...
|
||||
) -> None: ...
|
||||
def take_2d_axis1_int64_int64(
|
||||
values: np.ndarray, indexer: npt.NDArray[np.intp], out: np.ndarray, fill_value=...
|
||||
) -> None: ...
|
||||
def take_2d_axis1_uint16_uint16(
|
||||
values: np.ndarray, indexer: npt.NDArray[np.intp], out: np.ndarray, fill_value=...
|
||||
) -> None: ...
|
||||
def take_2d_axis1_uint32_uint32(
|
||||
values: np.ndarray, indexer: npt.NDArray[np.intp], out: np.ndarray, fill_value=...
|
||||
) -> None: ...
|
||||
def take_2d_axis1_uint64_uint64(
|
||||
values: np.ndarray, indexer: npt.NDArray[np.intp], out: np.ndarray, fill_value=...
|
||||
) -> None: ...
|
||||
def take_2d_axis1_int64_float64(
|
||||
values: np.ndarray, indexer: npt.NDArray[np.intp], out: np.ndarray, fill_value=...
|
||||
) -> None: ...
|
||||
def take_2d_axis1_float32_float32(
|
||||
values: np.ndarray, indexer: npt.NDArray[np.intp], out: np.ndarray, fill_value=...
|
||||
) -> None: ...
|
||||
def take_2d_axis1_float32_float64(
|
||||
values: np.ndarray, indexer: npt.NDArray[np.intp], out: np.ndarray, fill_value=...
|
||||
) -> None: ...
|
||||
def take_2d_axis1_float64_float64(
|
||||
values: np.ndarray, indexer: npt.NDArray[np.intp], out: np.ndarray, fill_value=...
|
||||
) -> None: ...
|
||||
def take_2d_axis1_object_object(
|
||||
values: np.ndarray, indexer: npt.NDArray[np.intp], out: np.ndarray, fill_value=...
|
||||
) -> None: ...
|
||||
def take_2d_axis1_bool_bool(
|
||||
values: np.ndarray, indexer: npt.NDArray[np.intp], out: np.ndarray, fill_value=...
|
||||
) -> None: ...
|
||||
def take_2d_axis1_bool_object(
|
||||
values: np.ndarray, indexer: npt.NDArray[np.intp], out: np.ndarray, fill_value=...
|
||||
) -> None: ...
|
||||
def take_2d_multi_int8_int8(
|
||||
values: np.ndarray,
|
||||
indexer: tuple[npt.NDArray[np.intp], npt.NDArray[np.intp]],
|
||||
out: np.ndarray,
|
||||
fill_value=...,
|
||||
) -> None: ...
|
||||
def take_2d_multi_int8_int32(
|
||||
values: np.ndarray,
|
||||
indexer: tuple[npt.NDArray[np.intp], npt.NDArray[np.intp]],
|
||||
out: np.ndarray,
|
||||
fill_value=...,
|
||||
) -> None: ...
|
||||
def take_2d_multi_int8_int64(
|
||||
values: np.ndarray,
|
||||
indexer: tuple[npt.NDArray[np.intp], npt.NDArray[np.intp]],
|
||||
out: np.ndarray,
|
||||
fill_value=...,
|
||||
) -> None: ...
|
||||
def take_2d_multi_int8_float64(
|
||||
values: np.ndarray,
|
||||
indexer: tuple[npt.NDArray[np.intp], npt.NDArray[np.intp]],
|
||||
out: np.ndarray,
|
||||
fill_value=...,
|
||||
) -> None: ...
|
||||
def take_2d_multi_int16_int16(
|
||||
values: np.ndarray,
|
||||
indexer: tuple[npt.NDArray[np.intp], npt.NDArray[np.intp]],
|
||||
out: np.ndarray,
|
||||
fill_value=...,
|
||||
) -> None: ...
|
||||
def take_2d_multi_int16_int32(
|
||||
values: np.ndarray,
|
||||
indexer: tuple[npt.NDArray[np.intp], npt.NDArray[np.intp]],
|
||||
out: np.ndarray,
|
||||
fill_value=...,
|
||||
) -> None: ...
|
||||
def take_2d_multi_int16_int64(
|
||||
values: np.ndarray,
|
||||
indexer: tuple[npt.NDArray[np.intp], npt.NDArray[np.intp]],
|
||||
out: np.ndarray,
|
||||
fill_value=...,
|
||||
) -> None: ...
|
||||
def take_2d_multi_int16_float64(
|
||||
values: np.ndarray,
|
||||
indexer: tuple[npt.NDArray[np.intp], npt.NDArray[np.intp]],
|
||||
out: np.ndarray,
|
||||
fill_value=...,
|
||||
) -> None: ...
|
||||
def take_2d_multi_int32_int32(
|
||||
values: np.ndarray,
|
||||
indexer: tuple[npt.NDArray[np.intp], npt.NDArray[np.intp]],
|
||||
out: np.ndarray,
|
||||
fill_value=...,
|
||||
) -> None: ...
|
||||
def take_2d_multi_int32_int64(
|
||||
values: np.ndarray,
|
||||
indexer: tuple[npt.NDArray[np.intp], npt.NDArray[np.intp]],
|
||||
out: np.ndarray,
|
||||
fill_value=...,
|
||||
) -> None: ...
|
||||
def take_2d_multi_int32_float64(
|
||||
values: np.ndarray,
|
||||
indexer: tuple[npt.NDArray[np.intp], npt.NDArray[np.intp]],
|
||||
out: np.ndarray,
|
||||
fill_value=...,
|
||||
) -> None: ...
|
||||
def take_2d_multi_int64_float64(
|
||||
values: np.ndarray,
|
||||
indexer: tuple[npt.NDArray[np.intp], npt.NDArray[np.intp]],
|
||||
out: np.ndarray,
|
||||
fill_value=...,
|
||||
) -> None: ...
|
||||
def take_2d_multi_float32_float32(
|
||||
values: np.ndarray,
|
||||
indexer: tuple[npt.NDArray[np.intp], npt.NDArray[np.intp]],
|
||||
out: np.ndarray,
|
||||
fill_value=...,
|
||||
) -> None: ...
|
||||
def take_2d_multi_float32_float64(
|
||||
values: np.ndarray,
|
||||
indexer: tuple[npt.NDArray[np.intp], npt.NDArray[np.intp]],
|
||||
out: np.ndarray,
|
||||
fill_value=...,
|
||||
) -> None: ...
|
||||
def take_2d_multi_float64_float64(
|
||||
values: np.ndarray,
|
||||
indexer: tuple[npt.NDArray[np.intp], npt.NDArray[np.intp]],
|
||||
out: np.ndarray,
|
||||
fill_value=...,
|
||||
) -> None: ...
|
||||
def take_2d_multi_object_object(
|
||||
values: np.ndarray,
|
||||
indexer: tuple[npt.NDArray[np.intp], npt.NDArray[np.intp]],
|
||||
out: np.ndarray,
|
||||
fill_value=...,
|
||||
) -> None: ...
|
||||
def take_2d_multi_bool_bool(
|
||||
values: np.ndarray,
|
||||
indexer: tuple[npt.NDArray[np.intp], npt.NDArray[np.intp]],
|
||||
out: np.ndarray,
|
||||
fill_value=...,
|
||||
) -> None: ...
|
||||
def take_2d_multi_bool_object(
|
||||
values: np.ndarray,
|
||||
indexer: tuple[npt.NDArray[np.intp], npt.NDArray[np.intp]],
|
||||
out: np.ndarray,
|
||||
fill_value=...,
|
||||
) -> None: ...
|
||||
def take_2d_multi_int64_int64(
|
||||
values: np.ndarray,
|
||||
indexer: tuple[npt.NDArray[np.intp], npt.NDArray[np.intp]],
|
||||
out: np.ndarray,
|
||||
fill_value=...,
|
||||
) -> None: ...
|
||||
BIN
venv/Lib/site-packages/pandas/_libs/arrays.cp311-win_amd64.lib
Normal file
BIN
venv/Lib/site-packages/pandas/_libs/arrays.cp311-win_amd64.lib
Normal file
Binary file not shown.
BIN
venv/Lib/site-packages/pandas/_libs/arrays.cp311-win_amd64.pyd
Normal file
BIN
venv/Lib/site-packages/pandas/_libs/arrays.cp311-win_amd64.pyd
Normal file
Binary file not shown.
40
venv/Lib/site-packages/pandas/_libs/arrays.pyi
Normal file
40
venv/Lib/site-packages/pandas/_libs/arrays.pyi
Normal file
@@ -0,0 +1,40 @@
|
||||
from collections.abc import Sequence
|
||||
from typing import Self
|
||||
|
||||
import numpy as np
|
||||
|
||||
from pandas._typing import (
|
||||
AxisInt,
|
||||
DtypeObj,
|
||||
Shape,
|
||||
)
|
||||
|
||||
class NDArrayBacked:
|
||||
_dtype: DtypeObj
|
||||
_ndarray: np.ndarray
|
||||
def __init__(self, values: np.ndarray, dtype: DtypeObj) -> None: ...
|
||||
@classmethod
|
||||
def _simple_new(cls, values: np.ndarray, dtype: DtypeObj) -> Self: ...
|
||||
def _from_backing_data(self, values: np.ndarray) -> Self: ...
|
||||
def __setstate__(self, state) -> None: ...
|
||||
def __len__(self) -> int: ...
|
||||
@property
|
||||
def shape(self) -> Shape: ...
|
||||
@property
|
||||
def ndim(self) -> int: ...
|
||||
@property
|
||||
def size(self) -> int: ...
|
||||
@property
|
||||
def nbytes(self) -> int: ...
|
||||
def copy(self, order=...) -> Self: ...
|
||||
def delete(self, loc, axis=...) -> Self: ...
|
||||
def swapaxes(self, axis1, axis2) -> Self: ...
|
||||
def repeat(self, repeats: int | Sequence[int], axis: int | None = ...) -> Self: ...
|
||||
def reshape(self, *args, **kwargs) -> Self: ...
|
||||
def ravel(self, order=...) -> Self: ...
|
||||
@property
|
||||
def T(self) -> Self: ...
|
||||
@classmethod
|
||||
def _concat_same_type(
|
||||
cls, to_concat: Sequence[Self], axis: AxisInt = ...
|
||||
) -> Self: ...
|
||||
BIN
venv/Lib/site-packages/pandas/_libs/byteswap.cp311-win_amd64.lib
Normal file
BIN
venv/Lib/site-packages/pandas/_libs/byteswap.cp311-win_amd64.lib
Normal file
Binary file not shown.
BIN
venv/Lib/site-packages/pandas/_libs/byteswap.cp311-win_amd64.pyd
Normal file
BIN
venv/Lib/site-packages/pandas/_libs/byteswap.cp311-win_amd64.pyd
Normal file
Binary file not shown.
5
venv/Lib/site-packages/pandas/_libs/byteswap.pyi
Normal file
5
venv/Lib/site-packages/pandas/_libs/byteswap.pyi
Normal file
@@ -0,0 +1,5 @@
|
||||
def read_float_with_byteswap(data: bytes, offset: int, byteswap: bool) -> float: ...
|
||||
def read_double_with_byteswap(data: bytes, offset: int, byteswap: bool) -> float: ...
|
||||
def read_uint16_with_byteswap(data: bytes, offset: int, byteswap: bool) -> int: ...
|
||||
def read_uint32_with_byteswap(data: bytes, offset: int, byteswap: bool) -> int: ...
|
||||
def read_uint64_with_byteswap(data: bytes, offset: int, byteswap: bool) -> int: ...
|
||||
BIN
venv/Lib/site-packages/pandas/_libs/groupby.cp311-win_amd64.lib
Normal file
BIN
venv/Lib/site-packages/pandas/_libs/groupby.cp311-win_amd64.lib
Normal file
Binary file not shown.
BIN
venv/Lib/site-packages/pandas/_libs/groupby.cp311-win_amd64.pyd
Normal file
BIN
venv/Lib/site-packages/pandas/_libs/groupby.cp311-win_amd64.pyd
Normal file
Binary file not shown.
234
venv/Lib/site-packages/pandas/_libs/groupby.pyi
Normal file
234
venv/Lib/site-packages/pandas/_libs/groupby.pyi
Normal file
@@ -0,0 +1,234 @@
|
||||
from typing import Literal
|
||||
|
||||
import numpy as np
|
||||
|
||||
from pandas._typing import npt
|
||||
|
||||
def group_median_float64(
|
||||
out: np.ndarray, # ndarray[float64_t, ndim=2]
|
||||
counts: npt.NDArray[np.int64],
|
||||
values: np.ndarray, # ndarray[float64_t, ndim=2]
|
||||
labels: npt.NDArray[np.int64],
|
||||
min_count: int = ..., # Py_ssize_t
|
||||
mask: np.ndarray | None = ...,
|
||||
result_mask: np.ndarray | None = ...,
|
||||
is_datetimelike: bool = ..., # bint
|
||||
skipna: bool = ...,
|
||||
) -> None: ...
|
||||
def group_cumprod(
|
||||
out: np.ndarray, # float64_t[:, ::1]
|
||||
values: np.ndarray, # const float64_t[:, :]
|
||||
labels: np.ndarray, # const int64_t[:]
|
||||
ngroups: int,
|
||||
is_datetimelike: bool,
|
||||
skipna: bool = ...,
|
||||
mask: np.ndarray | None = ...,
|
||||
result_mask: np.ndarray | None = ...,
|
||||
) -> None: ...
|
||||
def group_cumsum(
|
||||
out: np.ndarray, # int64float_t[:, ::1]
|
||||
values: np.ndarray, # ndarray[int64float_t, ndim=2]
|
||||
labels: np.ndarray, # const int64_t[:]
|
||||
ngroups: int,
|
||||
is_datetimelike: bool,
|
||||
skipna: bool = ...,
|
||||
mask: np.ndarray | None = ...,
|
||||
result_mask: np.ndarray | None = ...,
|
||||
) -> None: ...
|
||||
def group_shift_indexer(
|
||||
out: np.ndarray, # int64_t[::1]
|
||||
labels: np.ndarray, # const int64_t[:]
|
||||
ngroups: int,
|
||||
periods: int,
|
||||
) -> None: ...
|
||||
def group_fillna_indexer(
|
||||
out: np.ndarray, # ndarray[intp_t]
|
||||
labels: np.ndarray, # ndarray[int64_t]
|
||||
mask: npt.NDArray[np.uint8],
|
||||
limit: int, # int64_t
|
||||
compute_ffill: bool,
|
||||
ngroups: int,
|
||||
) -> None: ...
|
||||
def group_any_all(
|
||||
out: np.ndarray, # uint8_t[::1]
|
||||
values: np.ndarray, # const uint8_t[::1]
|
||||
labels: np.ndarray, # const int64_t[:]
|
||||
mask: np.ndarray, # const uint8_t[::1]
|
||||
val_test: Literal["any", "all"],
|
||||
skipna: bool,
|
||||
result_mask: np.ndarray | None,
|
||||
) -> None: ...
|
||||
def group_sum(
|
||||
out: np.ndarray, # complexfloatingintuint_t[:, ::1]
|
||||
counts: np.ndarray, # int64_t[::1]
|
||||
values: np.ndarray, # ndarray[complexfloatingintuint_t, ndim=2]
|
||||
labels: np.ndarray, # const intp_t[:]
|
||||
mask: np.ndarray | None,
|
||||
result_mask: np.ndarray | None = ...,
|
||||
min_count: int = ...,
|
||||
is_datetimelike: bool = ...,
|
||||
initial: object = ...,
|
||||
skipna: bool = ...,
|
||||
) -> None: ...
|
||||
def group_prod(
|
||||
out: np.ndarray, # int64float_t[:, ::1]
|
||||
counts: np.ndarray, # int64_t[::1]
|
||||
values: np.ndarray, # ndarray[int64float_t, ndim=2]
|
||||
labels: np.ndarray, # const intp_t[:]
|
||||
mask: np.ndarray | None,
|
||||
result_mask: np.ndarray | None = ...,
|
||||
min_count: int = ...,
|
||||
skipna: bool = ...,
|
||||
) -> None: ...
|
||||
def group_var(
|
||||
out: np.ndarray, # floating[:, ::1]
|
||||
counts: np.ndarray, # int64_t[::1]
|
||||
values: np.ndarray, # ndarray[floating, ndim=2]
|
||||
labels: np.ndarray, # const intp_t[:]
|
||||
min_count: int = ..., # Py_ssize_t
|
||||
ddof: int = ..., # int64_t
|
||||
mask: np.ndarray | None = ...,
|
||||
result_mask: np.ndarray | None = ...,
|
||||
is_datetimelike: bool = ...,
|
||||
name: str = ...,
|
||||
skipna: bool = ...,
|
||||
) -> None: ...
|
||||
def group_skew(
|
||||
out: np.ndarray, # float64_t[:, ::1]
|
||||
counts: np.ndarray, # int64_t[::1]
|
||||
values: np.ndarray, # ndarray[float64_T, ndim=2]
|
||||
labels: np.ndarray, # const intp_t[::1]
|
||||
mask: np.ndarray | None = ...,
|
||||
result_mask: np.ndarray | None = ...,
|
||||
skipna: bool = ...,
|
||||
) -> None: ...
|
||||
def group_kurt(
|
||||
out: np.ndarray, # float64_t[:, ::1]
|
||||
counts: np.ndarray, # int64_t[::1]
|
||||
values: np.ndarray, # ndarray[float64_T, ndim=2]
|
||||
labels: np.ndarray, # const intp_t[::1]
|
||||
mask: np.ndarray | None = ...,
|
||||
result_mask: np.ndarray | None = ...,
|
||||
skipna: bool = ...,
|
||||
) -> None: ...
|
||||
def group_mean(
|
||||
out: np.ndarray, # floating[:, ::1]
|
||||
counts: np.ndarray, # int64_t[::1]
|
||||
values: np.ndarray, # ndarray[floating, ndim=2]
|
||||
labels: np.ndarray, # const intp_t[:]
|
||||
min_count: int = ..., # Py_ssize_t
|
||||
is_datetimelike: bool = ..., # bint
|
||||
mask: np.ndarray | None = ...,
|
||||
result_mask: np.ndarray | None = ...,
|
||||
skipna: bool = ...,
|
||||
) -> None: ...
|
||||
def group_ohlc(
|
||||
out: np.ndarray, # floatingintuint_t[:, ::1]
|
||||
counts: np.ndarray, # int64_t[::1]
|
||||
values: np.ndarray, # ndarray[floatingintuint_t, ndim=2]
|
||||
labels: np.ndarray, # const intp_t[:]
|
||||
min_count: int = ...,
|
||||
mask: np.ndarray | None = ...,
|
||||
result_mask: np.ndarray | None = ...,
|
||||
) -> None: ...
|
||||
def group_quantile(
|
||||
out: npt.NDArray[np.float64],
|
||||
values: np.ndarray, # ndarray[numeric, ndim=1]
|
||||
labels: npt.NDArray[np.intp],
|
||||
mask: npt.NDArray[np.uint8],
|
||||
qs: npt.NDArray[np.float64], # const
|
||||
starts: npt.NDArray[np.int64],
|
||||
ends: npt.NDArray[np.int64],
|
||||
interpolation: Literal["linear", "lower", "higher", "nearest", "midpoint"],
|
||||
result_mask: np.ndarray | None,
|
||||
is_datetimelike: bool,
|
||||
) -> None: ...
|
||||
def group_last(
|
||||
out: np.ndarray, # rank_t[:, ::1]
|
||||
counts: np.ndarray, # int64_t[::1]
|
||||
values: np.ndarray, # ndarray[rank_t, ndim=2]
|
||||
labels: np.ndarray, # const int64_t[:]
|
||||
mask: npt.NDArray[np.bool_] | None,
|
||||
result_mask: npt.NDArray[np.bool_] | None = ...,
|
||||
min_count: int = ..., # Py_ssize_t
|
||||
is_datetimelike: bool = ...,
|
||||
skipna: bool = ...,
|
||||
) -> None: ...
|
||||
def group_nth(
|
||||
out: np.ndarray, # rank_t[:, ::1]
|
||||
counts: np.ndarray, # int64_t[::1]
|
||||
values: np.ndarray, # ndarray[rank_t, ndim=2]
|
||||
labels: np.ndarray, # const int64_t[:]
|
||||
mask: npt.NDArray[np.bool_] | None,
|
||||
result_mask: npt.NDArray[np.bool_] | None = ...,
|
||||
min_count: int = ..., # int64_t
|
||||
rank: int = ..., # int64_t
|
||||
is_datetimelike: bool = ...,
|
||||
skipna: bool = ...,
|
||||
) -> None: ...
|
||||
def group_rank(
|
||||
out: np.ndarray, # float64_t[:, ::1]
|
||||
values: np.ndarray, # ndarray[rank_t, ndim=2]
|
||||
labels: np.ndarray, # const int64_t[:]
|
||||
ngroups: int,
|
||||
is_datetimelike: bool,
|
||||
ties_method: Literal["average", "min", "max", "first", "dense"] = ...,
|
||||
ascending: bool = ...,
|
||||
pct: bool = ...,
|
||||
na_option: Literal["keep", "top", "bottom"] = ...,
|
||||
mask: npt.NDArray[np.bool_] | None = ...,
|
||||
) -> None: ...
|
||||
def group_max(
|
||||
out: np.ndarray, # groupby_t[:, ::1]
|
||||
counts: np.ndarray, # int64_t[::1]
|
||||
values: np.ndarray, # ndarray[groupby_t, ndim=2]
|
||||
labels: np.ndarray, # const int64_t[:]
|
||||
min_count: int = ...,
|
||||
is_datetimelike: bool = ...,
|
||||
mask: np.ndarray | None = ...,
|
||||
result_mask: np.ndarray | None = ...,
|
||||
skipna: bool = ...,
|
||||
) -> None: ...
|
||||
def group_min(
|
||||
out: np.ndarray, # groupby_t[:, ::1]
|
||||
counts: np.ndarray, # int64_t[::1]
|
||||
values: np.ndarray, # ndarray[groupby_t, ndim=2]
|
||||
labels: np.ndarray, # const int64_t[:]
|
||||
min_count: int = ...,
|
||||
is_datetimelike: bool = ...,
|
||||
mask: np.ndarray | None = ...,
|
||||
result_mask: np.ndarray | None = ...,
|
||||
skipna: bool = ...,
|
||||
) -> None: ...
|
||||
def group_idxmin_idxmax(
|
||||
out: npt.NDArray[np.intp],
|
||||
counts: npt.NDArray[np.int64],
|
||||
values: np.ndarray, # ndarray[groupby_t, ndim=2]
|
||||
labels: npt.NDArray[np.intp],
|
||||
min_count: int = ...,
|
||||
is_datetimelike: bool = ...,
|
||||
mask: np.ndarray | None = ...,
|
||||
name: str = ...,
|
||||
skipna: bool = ...,
|
||||
result_mask: np.ndarray | None = ...,
|
||||
) -> None: ...
|
||||
def group_cummin(
|
||||
out: np.ndarray, # groupby_t[:, ::1]
|
||||
values: np.ndarray, # ndarray[groupby_t, ndim=2]
|
||||
labels: np.ndarray, # const int64_t[:]
|
||||
ngroups: int,
|
||||
is_datetimelike: bool,
|
||||
mask: np.ndarray | None = ...,
|
||||
result_mask: np.ndarray | None = ...,
|
||||
skipna: bool = ...,
|
||||
) -> None: ...
|
||||
def group_cummax(
|
||||
out: np.ndarray, # groupby_t[:, ::1]
|
||||
values: np.ndarray, # ndarray[groupby_t, ndim=2]
|
||||
labels: np.ndarray, # const int64_t[:]
|
||||
ngroups: int,
|
||||
is_datetimelike: bool,
|
||||
mask: np.ndarray | None = ...,
|
||||
result_mask: np.ndarray | None = ...,
|
||||
skipna: bool = ...,
|
||||
) -> None: ...
|
||||
BIN
venv/Lib/site-packages/pandas/_libs/hashing.cp311-win_amd64.lib
Normal file
BIN
venv/Lib/site-packages/pandas/_libs/hashing.cp311-win_amd64.lib
Normal file
Binary file not shown.
BIN
venv/Lib/site-packages/pandas/_libs/hashing.cp311-win_amd64.pyd
Normal file
BIN
venv/Lib/site-packages/pandas/_libs/hashing.cp311-win_amd64.pyd
Normal file
Binary file not shown.
9
venv/Lib/site-packages/pandas/_libs/hashing.pyi
Normal file
9
venv/Lib/site-packages/pandas/_libs/hashing.pyi
Normal file
@@ -0,0 +1,9 @@
|
||||
import numpy as np
|
||||
|
||||
from pandas._typing import npt
|
||||
|
||||
def hash_object_array(
|
||||
arr: npt.NDArray[np.object_],
|
||||
key: str,
|
||||
encoding: str = ...,
|
||||
) -> npt.NDArray[np.uint64]: ...
|
||||
Binary file not shown.
Binary file not shown.
274
venv/Lib/site-packages/pandas/_libs/hashtable.pyi
Normal file
274
venv/Lib/site-packages/pandas/_libs/hashtable.pyi
Normal file
@@ -0,0 +1,274 @@
|
||||
from collections.abc import Hashable
|
||||
from typing import (
|
||||
Any,
|
||||
Literal,
|
||||
overload,
|
||||
)
|
||||
|
||||
import numpy as np
|
||||
|
||||
from pandas._typing import npt
|
||||
|
||||
def unique_label_indices(
|
||||
labels: np.ndarray, # const int64_t[:]
|
||||
) -> np.ndarray: ...
|
||||
|
||||
class Factorizer:
|
||||
count: int
|
||||
uniques: Any
|
||||
def __init__(self, size_hint: int, uses_mask: bool = False) -> None: ...
|
||||
def get_count(self) -> int: ...
|
||||
def factorize(
|
||||
self,
|
||||
values: np.ndarray,
|
||||
na_sentinel=...,
|
||||
na_value=...,
|
||||
mask=...,
|
||||
) -> npt.NDArray[np.intp]: ...
|
||||
def hash_inner_join(
|
||||
self, values: np.ndarray, mask=...
|
||||
) -> tuple[np.ndarray, np.ndarray]: ...
|
||||
|
||||
class ObjectFactorizer(Factorizer):
|
||||
table: PyObjectHashTable
|
||||
uniques: ObjectVector
|
||||
|
||||
class Int64Factorizer(Factorizer):
|
||||
table: Int64HashTable
|
||||
uniques: Int64Vector
|
||||
|
||||
class UInt64Factorizer(Factorizer):
|
||||
table: UInt64HashTable
|
||||
uniques: UInt64Vector
|
||||
|
||||
class Int32Factorizer(Factorizer):
|
||||
table: Int32HashTable
|
||||
uniques: Int32Vector
|
||||
|
||||
class UInt32Factorizer(Factorizer):
|
||||
table: UInt32HashTable
|
||||
uniques: UInt32Vector
|
||||
|
||||
class Int16Factorizer(Factorizer):
|
||||
table: Int16HashTable
|
||||
uniques: Int16Vector
|
||||
|
||||
class UInt16Factorizer(Factorizer):
|
||||
table: UInt16HashTable
|
||||
uniques: UInt16Vector
|
||||
|
||||
class Int8Factorizer(Factorizer):
|
||||
table: Int8HashTable
|
||||
uniques: Int8Vector
|
||||
|
||||
class UInt8Factorizer(Factorizer):
|
||||
table: UInt8HashTable
|
||||
uniques: UInt8Vector
|
||||
|
||||
class Float64Factorizer(Factorizer):
|
||||
table: Float64HashTable
|
||||
uniques: Float64Vector
|
||||
|
||||
class Float32Factorizer(Factorizer):
|
||||
table: Float32HashTable
|
||||
uniques: Float32Vector
|
||||
|
||||
class Complex64Factorizer(Factorizer):
|
||||
table: Complex64HashTable
|
||||
uniques: Complex64Vector
|
||||
|
||||
class Complex128Factorizer(Factorizer):
|
||||
table: Complex128HashTable
|
||||
uniques: Complex128Vector
|
||||
|
||||
class Int64Vector:
|
||||
def __init__(self, *args) -> None: ...
|
||||
def __len__(self) -> int: ...
|
||||
def to_array(self) -> npt.NDArray[np.int64]: ...
|
||||
|
||||
class Int32Vector:
|
||||
def __init__(self, *args) -> None: ...
|
||||
def __len__(self) -> int: ...
|
||||
def to_array(self) -> npt.NDArray[np.int32]: ...
|
||||
|
||||
class Int16Vector:
|
||||
def __init__(self, *args) -> None: ...
|
||||
def __len__(self) -> int: ...
|
||||
def to_array(self) -> npt.NDArray[np.int16]: ...
|
||||
|
||||
class Int8Vector:
|
||||
def __init__(self, *args) -> None: ...
|
||||
def __len__(self) -> int: ...
|
||||
def to_array(self) -> npt.NDArray[np.int8]: ...
|
||||
|
||||
class UInt64Vector:
|
||||
def __init__(self, *args) -> None: ...
|
||||
def __len__(self) -> int: ...
|
||||
def to_array(self) -> npt.NDArray[np.uint64]: ...
|
||||
|
||||
class UInt32Vector:
|
||||
def __init__(self, *args) -> None: ...
|
||||
def __len__(self) -> int: ...
|
||||
def to_array(self) -> npt.NDArray[np.uint32]: ...
|
||||
|
||||
class UInt16Vector:
|
||||
def __init__(self, *args) -> None: ...
|
||||
def __len__(self) -> int: ...
|
||||
def to_array(self) -> npt.NDArray[np.uint16]: ...
|
||||
|
||||
class UInt8Vector:
|
||||
def __init__(self, *args) -> None: ...
|
||||
def __len__(self) -> int: ...
|
||||
def to_array(self) -> npt.NDArray[np.uint8]: ...
|
||||
|
||||
class Float64Vector:
|
||||
def __init__(self, *args) -> None: ...
|
||||
def __len__(self) -> int: ...
|
||||
def to_array(self) -> npt.NDArray[np.float64]: ...
|
||||
|
||||
class Float32Vector:
|
||||
def __init__(self, *args) -> None: ...
|
||||
def __len__(self) -> int: ...
|
||||
def to_array(self) -> npt.NDArray[np.float32]: ...
|
||||
|
||||
class Complex128Vector:
|
||||
def __init__(self, *args) -> None: ...
|
||||
def __len__(self) -> int: ...
|
||||
def to_array(self) -> npt.NDArray[np.complex128]: ...
|
||||
|
||||
class Complex64Vector:
|
||||
def __init__(self, *args) -> None: ...
|
||||
def __len__(self) -> int: ...
|
||||
def to_array(self) -> npt.NDArray[np.complex64]: ...
|
||||
|
||||
class StringVector:
|
||||
def __init__(self, *args) -> None: ...
|
||||
def __len__(self) -> int: ...
|
||||
def to_array(self) -> npt.NDArray[np.object_]: ...
|
||||
|
||||
class ObjectVector:
|
||||
def __init__(self, *args) -> None: ...
|
||||
def __len__(self) -> int: ...
|
||||
def to_array(self) -> npt.NDArray[np.object_]: ...
|
||||
|
||||
class HashTable:
|
||||
# NB: The base HashTable class does _not_ actually have these methods;
|
||||
# we are putting them here for the sake of mypy to avoid
|
||||
# reproducing them in each subclass below.
|
||||
def __init__(self, size_hint: int = ..., uses_mask: bool = ...) -> None: ...
|
||||
def __len__(self) -> int: ...
|
||||
def __contains__(self, key: Hashable) -> bool: ...
|
||||
def sizeof(self, deep: bool = ...) -> int: ...
|
||||
def get_state(self) -> dict[str, int]: ...
|
||||
# TODO: `val/key` type is subclass-specific
|
||||
def get_item(self, val): ... # TODO: return type?
|
||||
def set_item(self, key, val) -> None: ...
|
||||
def get_na(self): ... # TODO: return type?
|
||||
def set_na(self, val) -> None: ...
|
||||
def map_locations(
|
||||
self,
|
||||
values: np.ndarray, # np.ndarray[subclass-specific]
|
||||
mask: npt.NDArray[np.bool_] | None = ...,
|
||||
) -> None: ...
|
||||
def lookup(
|
||||
self,
|
||||
values: np.ndarray, # np.ndarray[subclass-specific]
|
||||
mask: npt.NDArray[np.bool_] | None = ...,
|
||||
) -> npt.NDArray[np.intp]: ...
|
||||
def get_labels(
|
||||
self,
|
||||
values: np.ndarray, # np.ndarray[subclass-specific]
|
||||
uniques, # SubclassTypeVector
|
||||
count_prior: int = ...,
|
||||
na_sentinel: int = ...,
|
||||
na_value: object = ...,
|
||||
mask=...,
|
||||
) -> npt.NDArray[np.intp]: ...
|
||||
@overload
|
||||
def unique(
|
||||
self,
|
||||
values: np.ndarray, # np.ndarray[subclass-specific]
|
||||
*,
|
||||
return_inverse: Literal[False] = ...,
|
||||
mask: None = ...,
|
||||
) -> np.ndarray: ... # np.ndarray[subclass-specific]
|
||||
@overload
|
||||
def unique(
|
||||
self,
|
||||
values: np.ndarray, # np.ndarray[subclass-specific]
|
||||
*,
|
||||
return_inverse: Literal[True],
|
||||
mask: None = ...,
|
||||
) -> tuple[np.ndarray, npt.NDArray[np.intp]]: ... # np.ndarray[subclass-specific]
|
||||
@overload
|
||||
def unique(
|
||||
self,
|
||||
values: np.ndarray, # np.ndarray[subclass-specific]
|
||||
*,
|
||||
return_inverse: Literal[False] = ...,
|
||||
mask: npt.NDArray[np.bool_],
|
||||
) -> tuple[
|
||||
np.ndarray,
|
||||
npt.NDArray[np.bool_],
|
||||
]: ... # np.ndarray[subclass-specific]
|
||||
def factorize(
|
||||
self,
|
||||
values: np.ndarray, # np.ndarray[subclass-specific]
|
||||
na_sentinel: int = ...,
|
||||
na_value: object = ...,
|
||||
mask=...,
|
||||
ignore_na: bool = True,
|
||||
) -> tuple[np.ndarray, npt.NDArray[np.intp]]: ... # np.ndarray[subclass-specific]
|
||||
def hash_inner_join(
|
||||
self, values: np.ndarray, mask=...
|
||||
) -> tuple[np.ndarray, np.ndarray]: ...
|
||||
|
||||
class Complex128HashTable(HashTable): ...
|
||||
class Complex64HashTable(HashTable): ...
|
||||
class Float64HashTable(HashTable): ...
|
||||
class Float32HashTable(HashTable): ...
|
||||
|
||||
class Int64HashTable(HashTable):
|
||||
# Only Int64HashTable has get_labels_groupby, map_keys_to_values
|
||||
def get_labels_groupby(
|
||||
self,
|
||||
values: npt.NDArray[np.int64], # const int64_t[:]
|
||||
) -> tuple[npt.NDArray[np.intp], npt.NDArray[np.int64]]: ...
|
||||
def map_keys_to_values(
|
||||
self,
|
||||
keys: npt.NDArray[np.int64],
|
||||
values: npt.NDArray[np.int64], # const int64_t[:]
|
||||
) -> None: ...
|
||||
|
||||
class Int32HashTable(HashTable): ...
|
||||
class Int16HashTable(HashTable): ...
|
||||
class Int8HashTable(HashTable): ...
|
||||
class UInt64HashTable(HashTable): ...
|
||||
class UInt32HashTable(HashTable): ...
|
||||
class UInt16HashTable(HashTable): ...
|
||||
class UInt8HashTable(HashTable): ...
|
||||
class StringHashTable(HashTable): ...
|
||||
class PyObjectHashTable(HashTable): ...
|
||||
class IntpHashTable(HashTable): ...
|
||||
|
||||
def duplicated(
|
||||
values: np.ndarray,
|
||||
keep: Literal["last", "first", False] = ...,
|
||||
mask: npt.NDArray[np.bool_] | None = ...,
|
||||
) -> npt.NDArray[np.bool_]: ...
|
||||
def mode(
|
||||
values: np.ndarray, dropna: bool, mask: npt.NDArray[np.bool_] | None = ...
|
||||
) -> np.ndarray: ...
|
||||
def value_count(
|
||||
values: np.ndarray,
|
||||
dropna: bool,
|
||||
mask: npt.NDArray[np.bool_] | None = ...,
|
||||
) -> tuple[np.ndarray, npt.NDArray[np.int64], int]: ... # np.ndarray[same-as-values]
|
||||
|
||||
# arr and values should have same dtype
|
||||
def ismember(
|
||||
arr: np.ndarray,
|
||||
values: np.ndarray,
|
||||
) -> npt.NDArray[np.bool_]: ...
|
||||
def object_hash(obj) -> int: ...
|
||||
def objects_are_equal(a, b) -> bool: ...
|
||||
BIN
venv/Lib/site-packages/pandas/_libs/index.cp311-win_amd64.lib
Normal file
BIN
venv/Lib/site-packages/pandas/_libs/index.cp311-win_amd64.lib
Normal file
Binary file not shown.
BIN
venv/Lib/site-packages/pandas/_libs/index.cp311-win_amd64.pyd
Normal file
BIN
venv/Lib/site-packages/pandas/_libs/index.cp311-win_amd64.pyd
Normal file
Binary file not shown.
107
venv/Lib/site-packages/pandas/_libs/index.pyi
Normal file
107
venv/Lib/site-packages/pandas/_libs/index.pyi
Normal file
@@ -0,0 +1,107 @@
|
||||
import numpy as np
|
||||
|
||||
from pandas._typing import npt
|
||||
|
||||
from pandas import (
|
||||
Index,
|
||||
MultiIndex,
|
||||
)
|
||||
from pandas.core.arrays import ExtensionArray
|
||||
|
||||
multiindex_nulls_shift: int
|
||||
|
||||
class IndexEngine:
|
||||
over_size_threshold: bool
|
||||
def __init__(self, values: np.ndarray) -> None: ...
|
||||
def __contains__(self, val: object) -> bool: ...
|
||||
|
||||
# -> int | slice | np.ndarray[bool]
|
||||
def get_loc(self, val: object) -> int | slice | np.ndarray: ...
|
||||
def sizeof(self, deep: bool = ...) -> int: ...
|
||||
def __sizeof__(self) -> int: ...
|
||||
@property
|
||||
def is_unique(self) -> bool: ...
|
||||
@property
|
||||
def is_monotonic_increasing(self) -> bool: ...
|
||||
@property
|
||||
def is_monotonic_decreasing(self) -> bool: ...
|
||||
@property
|
||||
def is_mapping_populated(self) -> bool: ...
|
||||
def clear_mapping(self): ...
|
||||
def get_indexer(self, values: np.ndarray) -> npt.NDArray[np.intp]: ...
|
||||
def get_indexer_non_unique(
|
||||
self,
|
||||
targets: np.ndarray,
|
||||
) -> tuple[npt.NDArray[np.intp], npt.NDArray[np.intp]]: ...
|
||||
|
||||
class MaskedIndexEngine(IndexEngine):
|
||||
def __init__(self, values: object) -> None: ...
|
||||
def get_indexer_non_unique(
|
||||
self, targets: object
|
||||
) -> tuple[npt.NDArray[np.intp], npt.NDArray[np.intp]]: ...
|
||||
|
||||
class Float64Engine(IndexEngine): ...
|
||||
class Float32Engine(IndexEngine): ...
|
||||
class Complex128Engine(IndexEngine): ...
|
||||
class Complex64Engine(IndexEngine): ...
|
||||
class Int64Engine(IndexEngine): ...
|
||||
class Int32Engine(IndexEngine): ...
|
||||
class Int16Engine(IndexEngine): ...
|
||||
class Int8Engine(IndexEngine): ...
|
||||
class UInt64Engine(IndexEngine): ...
|
||||
class UInt32Engine(IndexEngine): ...
|
||||
class UInt16Engine(IndexEngine): ...
|
||||
class UInt8Engine(IndexEngine): ...
|
||||
class ObjectEngine(IndexEngine): ...
|
||||
class StringEngine(IndexEngine): ...
|
||||
class DatetimeEngine(Int64Engine): ...
|
||||
class TimedeltaEngine(DatetimeEngine): ...
|
||||
class PeriodEngine(Int64Engine): ...
|
||||
class BoolEngine(UInt8Engine): ...
|
||||
class MaskedFloat64Engine(MaskedIndexEngine): ...
|
||||
class MaskedFloat32Engine(MaskedIndexEngine): ...
|
||||
class MaskedComplex128Engine(MaskedIndexEngine): ...
|
||||
class MaskedComplex64Engine(MaskedIndexEngine): ...
|
||||
class MaskedInt64Engine(MaskedIndexEngine): ...
|
||||
class MaskedInt32Engine(MaskedIndexEngine): ...
|
||||
class MaskedInt16Engine(MaskedIndexEngine): ...
|
||||
class MaskedInt8Engine(MaskedIndexEngine): ...
|
||||
class MaskedUInt64Engine(MaskedIndexEngine): ...
|
||||
class MaskedUInt32Engine(MaskedIndexEngine): ...
|
||||
class MaskedUInt16Engine(MaskedIndexEngine): ...
|
||||
class MaskedUInt8Engine(MaskedIndexEngine): ...
|
||||
class MaskedBoolEngine(MaskedUInt8Engine): ...
|
||||
|
||||
class StringObjectEngine(ObjectEngine):
|
||||
def __init__(self, values: object, na_value) -> None: ...
|
||||
|
||||
class BaseMultiIndexCodesEngine:
|
||||
levels: list[np.ndarray]
|
||||
offsets: np.ndarray # np.ndarray[..., ndim=1]
|
||||
|
||||
def __init__(
|
||||
self,
|
||||
levels: list[Index], # all entries hashable
|
||||
labels: list[np.ndarray], # all entries integer-dtyped
|
||||
offsets: np.ndarray, # np.ndarray[..., ndim=1]
|
||||
) -> None: ...
|
||||
def get_indexer(self, target: npt.NDArray[np.object_]) -> npt.NDArray[np.intp]: ...
|
||||
def _extract_level_codes(self, target: MultiIndex) -> np.ndarray: ...
|
||||
|
||||
class ExtensionEngine:
|
||||
def __init__(self, values: ExtensionArray) -> None: ...
|
||||
def __contains__(self, val: object) -> bool: ...
|
||||
def get_loc(self, val: object) -> int | slice | np.ndarray: ...
|
||||
def get_indexer(self, values: np.ndarray) -> npt.NDArray[np.intp]: ...
|
||||
def get_indexer_non_unique(
|
||||
self,
|
||||
targets: np.ndarray,
|
||||
) -> tuple[npt.NDArray[np.intp], npt.NDArray[np.intp]]: ...
|
||||
@property
|
||||
def is_unique(self) -> bool: ...
|
||||
@property
|
||||
def is_monotonic_increasing(self) -> bool: ...
|
||||
@property
|
||||
def is_monotonic_decreasing(self) -> bool: ...
|
||||
def sizeof(self, deep: bool = ...) -> int: ...
|
||||
def clear_mapping(self): ...
|
||||
BIN
venv/Lib/site-packages/pandas/_libs/indexing.cp311-win_amd64.lib
Normal file
BIN
venv/Lib/site-packages/pandas/_libs/indexing.cp311-win_amd64.lib
Normal file
Binary file not shown.
BIN
venv/Lib/site-packages/pandas/_libs/indexing.cp311-win_amd64.pyd
Normal file
BIN
venv/Lib/site-packages/pandas/_libs/indexing.cp311-win_amd64.pyd
Normal file
Binary file not shown.
17
venv/Lib/site-packages/pandas/_libs/indexing.pyi
Normal file
17
venv/Lib/site-packages/pandas/_libs/indexing.pyi
Normal file
@@ -0,0 +1,17 @@
|
||||
from typing import (
|
||||
Generic,
|
||||
TypeVar,
|
||||
)
|
||||
|
||||
from pandas.core.indexing import IndexingMixin
|
||||
|
||||
_IndexingMixinT = TypeVar("_IndexingMixinT", bound=IndexingMixin)
|
||||
|
||||
class NDFrameIndexerBase(Generic[_IndexingMixinT]):
|
||||
name: str
|
||||
# in practice obj is either a DataFrame or a Series
|
||||
obj: _IndexingMixinT
|
||||
|
||||
def __init__(self, name: str, obj: _IndexingMixinT) -> None: ...
|
||||
@property
|
||||
def ndim(self) -> int: ...
|
||||
Binary file not shown.
Binary file not shown.
96
venv/Lib/site-packages/pandas/_libs/internals.pyi
Normal file
96
venv/Lib/site-packages/pandas/_libs/internals.pyi
Normal file
@@ -0,0 +1,96 @@
|
||||
from collections.abc import (
|
||||
Iterator,
|
||||
Sequence,
|
||||
)
|
||||
from typing import (
|
||||
Self,
|
||||
final,
|
||||
overload,
|
||||
)
|
||||
import weakref
|
||||
|
||||
import numpy as np
|
||||
|
||||
from pandas._typing import (
|
||||
ArrayLike,
|
||||
npt,
|
||||
)
|
||||
|
||||
from pandas import Index
|
||||
from pandas.core.internals.blocks import Block as B
|
||||
|
||||
def slice_len(slc: slice, objlen: int = ...) -> int: ...
|
||||
def get_concat_blkno_indexers(
|
||||
blknos_list: list[npt.NDArray[np.intp]],
|
||||
) -> list[tuple[npt.NDArray[np.intp], BlockPlacement]]: ...
|
||||
def get_blkno_indexers(
|
||||
blknos: np.ndarray, # int64_t[:]
|
||||
group: bool = ...,
|
||||
) -> list[tuple[int, slice | np.ndarray]]: ...
|
||||
def get_blkno_placements(
|
||||
blknos: np.ndarray,
|
||||
group: bool = ...,
|
||||
) -> Iterator[tuple[int, BlockPlacement]]: ...
|
||||
def update_blklocs_and_blknos(
|
||||
blklocs: npt.NDArray[np.intp],
|
||||
blknos: npt.NDArray[np.intp],
|
||||
loc: int,
|
||||
nblocks: int,
|
||||
) -> tuple[npt.NDArray[np.intp], npt.NDArray[np.intp]]: ...
|
||||
@final
|
||||
class BlockPlacement:
|
||||
def __init__(self, val: int | slice | np.ndarray) -> None: ...
|
||||
@property
|
||||
def indexer(self) -> np.ndarray | slice: ...
|
||||
@property
|
||||
def as_array(self) -> np.ndarray: ...
|
||||
@property
|
||||
def as_slice(self) -> slice: ...
|
||||
@property
|
||||
def is_slice_like(self) -> bool: ...
|
||||
@overload
|
||||
def __getitem__(
|
||||
self, loc: slice | Sequence[int] | npt.NDArray[np.intp]
|
||||
) -> BlockPlacement: ...
|
||||
@overload
|
||||
def __getitem__(self, loc: int) -> int: ...
|
||||
def __iter__(self) -> Iterator[int]: ...
|
||||
def __len__(self) -> int: ...
|
||||
def delete(self, loc) -> BlockPlacement: ...
|
||||
def add(self, other) -> BlockPlacement: ...
|
||||
def append(self, others: list[BlockPlacement]) -> BlockPlacement: ...
|
||||
def tile_for_unstack(self, factor: int) -> npt.NDArray[np.intp]: ...
|
||||
|
||||
class Block:
|
||||
_mgr_locs: BlockPlacement
|
||||
ndim: int
|
||||
values: ArrayLike
|
||||
refs: BlockValuesRefs
|
||||
def __init__(
|
||||
self,
|
||||
values: ArrayLike,
|
||||
placement: BlockPlacement,
|
||||
ndim: int,
|
||||
refs: BlockValuesRefs | None = ...,
|
||||
) -> None: ...
|
||||
def slice_block_rows(self, slicer: slice) -> Self: ...
|
||||
|
||||
class BlockManager:
|
||||
blocks: tuple[B, ...]
|
||||
axes: list[Index]
|
||||
_known_consolidated: bool
|
||||
_is_consolidated: bool
|
||||
_blknos: np.ndarray
|
||||
_blklocs: np.ndarray
|
||||
def __init__(
|
||||
self, blocks: tuple[B, ...], axes: list[Index], verify_integrity=...
|
||||
) -> None: ...
|
||||
def get_slice(self, slobj: slice, axis: int = ...) -> Self: ...
|
||||
def _rebuild_blknos_and_blklocs(self) -> None: ...
|
||||
|
||||
class BlockValuesRefs:
|
||||
referenced_blocks: list[weakref.ref]
|
||||
def __init__(self, blk: Block | None = ...) -> None: ...
|
||||
def add_reference(self, blk: Block) -> None: ...
|
||||
def add_index_reference(self, index: Index) -> None: ...
|
||||
def has_reference(self) -> bool: ...
|
||||
BIN
venv/Lib/site-packages/pandas/_libs/interval.cp311-win_amd64.lib
Normal file
BIN
venv/Lib/site-packages/pandas/_libs/interval.cp311-win_amd64.lib
Normal file
Binary file not shown.
BIN
venv/Lib/site-packages/pandas/_libs/interval.cp311-win_amd64.pyd
Normal file
BIN
venv/Lib/site-packages/pandas/_libs/interval.cp311-win_amd64.pyd
Normal file
Binary file not shown.
174
venv/Lib/site-packages/pandas/_libs/interval.pyi
Normal file
174
venv/Lib/site-packages/pandas/_libs/interval.pyi
Normal file
@@ -0,0 +1,174 @@
|
||||
from typing import (
|
||||
Any,
|
||||
Generic,
|
||||
TypeVar,
|
||||
overload,
|
||||
)
|
||||
|
||||
import numpy as np
|
||||
import numpy.typing as npt
|
||||
|
||||
from pandas._typing import (
|
||||
IntervalClosedType,
|
||||
Timedelta,
|
||||
Timestamp,
|
||||
)
|
||||
|
||||
VALID_CLOSED: frozenset[str]
|
||||
|
||||
_OrderableScalarT = TypeVar("_OrderableScalarT", int, float)
|
||||
_OrderableTimesT = TypeVar("_OrderableTimesT", Timestamp, Timedelta)
|
||||
_OrderableT = TypeVar("_OrderableT", int, float, Timestamp, Timedelta)
|
||||
|
||||
class _LengthDescriptor:
|
||||
@overload
|
||||
def __get__(
|
||||
self, instance: Interval[_OrderableScalarT], owner: Any
|
||||
) -> _OrderableScalarT: ...
|
||||
@overload
|
||||
def __get__(
|
||||
self, instance: Interval[_OrderableTimesT], owner: Any
|
||||
) -> Timedelta: ...
|
||||
|
||||
class _MidDescriptor:
|
||||
@overload
|
||||
def __get__(self, instance: Interval[_OrderableScalarT], owner: Any) -> float: ...
|
||||
@overload
|
||||
def __get__(
|
||||
self, instance: Interval[_OrderableTimesT], owner: Any
|
||||
) -> _OrderableTimesT: ...
|
||||
|
||||
class IntervalMixin:
|
||||
@property
|
||||
def closed_left(self) -> bool: ...
|
||||
@property
|
||||
def closed_right(self) -> bool: ...
|
||||
@property
|
||||
def open_left(self) -> bool: ...
|
||||
@property
|
||||
def open_right(self) -> bool: ...
|
||||
@property
|
||||
def is_empty(self) -> bool: ...
|
||||
def _check_closed_matches(self, other: IntervalMixin, name: str = ...) -> None: ...
|
||||
|
||||
class Interval(IntervalMixin, Generic[_OrderableT]):
|
||||
@property
|
||||
def left(self: Interval[_OrderableT]) -> _OrderableT: ...
|
||||
@property
|
||||
def right(self: Interval[_OrderableT]) -> _OrderableT: ...
|
||||
@property
|
||||
def closed(self) -> IntervalClosedType: ...
|
||||
mid: _MidDescriptor
|
||||
length: _LengthDescriptor
|
||||
def __init__(
|
||||
self,
|
||||
left: _OrderableT,
|
||||
right: _OrderableT,
|
||||
closed: IntervalClosedType = ...,
|
||||
) -> None: ...
|
||||
def __hash__(self) -> int: ...
|
||||
@overload
|
||||
def __contains__(
|
||||
self: Interval[Timedelta], key: Timedelta | Interval[Timedelta]
|
||||
) -> bool: ...
|
||||
@overload
|
||||
def __contains__(
|
||||
self: Interval[Timestamp], key: Timestamp | Interval[Timestamp]
|
||||
) -> bool: ...
|
||||
@overload
|
||||
def __contains__(
|
||||
self: Interval[_OrderableScalarT],
|
||||
key: _OrderableScalarT | Interval[_OrderableScalarT],
|
||||
) -> bool: ...
|
||||
@overload
|
||||
def __add__(
|
||||
self: Interval[_OrderableTimesT], y: Timedelta
|
||||
) -> Interval[_OrderableTimesT]: ...
|
||||
@overload
|
||||
def __add__(
|
||||
self: Interval[int], y: _OrderableScalarT
|
||||
) -> Interval[_OrderableScalarT]: ...
|
||||
@overload
|
||||
def __add__(self: Interval[float], y: float) -> Interval[float]: ...
|
||||
@overload
|
||||
def __radd__(
|
||||
self: Interval[_OrderableTimesT], y: Timedelta
|
||||
) -> Interval[_OrderableTimesT]: ...
|
||||
@overload
|
||||
def __radd__(
|
||||
self: Interval[int], y: _OrderableScalarT
|
||||
) -> Interval[_OrderableScalarT]: ...
|
||||
@overload
|
||||
def __radd__(self: Interval[float], y: float) -> Interval[float]: ...
|
||||
@overload
|
||||
def __sub__(
|
||||
self: Interval[_OrderableTimesT], y: Timedelta
|
||||
) -> Interval[_OrderableTimesT]: ...
|
||||
@overload
|
||||
def __sub__(
|
||||
self: Interval[int], y: _OrderableScalarT
|
||||
) -> Interval[_OrderableScalarT]: ...
|
||||
@overload
|
||||
def __sub__(self: Interval[float], y: float) -> Interval[float]: ...
|
||||
@overload
|
||||
def __rsub__(
|
||||
self: Interval[_OrderableTimesT], y: Timedelta
|
||||
) -> Interval[_OrderableTimesT]: ...
|
||||
@overload
|
||||
def __rsub__(
|
||||
self: Interval[int], y: _OrderableScalarT
|
||||
) -> Interval[_OrderableScalarT]: ...
|
||||
@overload
|
||||
def __rsub__(self: Interval[float], y: float) -> Interval[float]: ...
|
||||
@overload
|
||||
def __mul__(
|
||||
self: Interval[int], y: _OrderableScalarT
|
||||
) -> Interval[_OrderableScalarT]: ...
|
||||
@overload
|
||||
def __mul__(self: Interval[float], y: float) -> Interval[float]: ...
|
||||
@overload
|
||||
def __rmul__(
|
||||
self: Interval[int], y: _OrderableScalarT
|
||||
) -> Interval[_OrderableScalarT]: ...
|
||||
@overload
|
||||
def __rmul__(self: Interval[float], y: float) -> Interval[float]: ...
|
||||
@overload
|
||||
def __truediv__(
|
||||
self: Interval[int], y: _OrderableScalarT
|
||||
) -> Interval[_OrderableScalarT]: ...
|
||||
@overload
|
||||
def __truediv__(self: Interval[float], y: float) -> Interval[float]: ...
|
||||
@overload
|
||||
def __floordiv__(
|
||||
self: Interval[int], y: _OrderableScalarT
|
||||
) -> Interval[_OrderableScalarT]: ...
|
||||
@overload
|
||||
def __floordiv__(self: Interval[float], y: float) -> Interval[float]: ...
|
||||
def overlaps(self: Interval[_OrderableT], other: Interval[_OrderableT]) -> bool: ...
|
||||
|
||||
def intervals_to_interval_bounds(
|
||||
intervals: np.ndarray, validate_closed: bool = ...
|
||||
) -> tuple[np.ndarray, np.ndarray, IntervalClosedType]: ...
|
||||
|
||||
class IntervalTree(IntervalMixin):
|
||||
def __init__(
|
||||
self,
|
||||
left: np.ndarray,
|
||||
right: np.ndarray,
|
||||
closed: IntervalClosedType = ...,
|
||||
leaf_size: int = ...,
|
||||
) -> None: ...
|
||||
@property
|
||||
def mid(self) -> np.ndarray: ...
|
||||
@property
|
||||
def length(self) -> np.ndarray: ...
|
||||
def get_indexer(self, target) -> npt.NDArray[np.intp]: ...
|
||||
def get_indexer_non_unique(
|
||||
self, target
|
||||
) -> tuple[npt.NDArray[np.intp], npt.NDArray[np.intp]]: ...
|
||||
_na_count: int
|
||||
@property
|
||||
def is_overlapping(self) -> bool: ...
|
||||
@property
|
||||
def is_monotonic_increasing(self) -> bool: ...
|
||||
def clear_mapping(self) -> None: ...
|
||||
BIN
venv/Lib/site-packages/pandas/_libs/join.cp311-win_amd64.lib
Normal file
BIN
venv/Lib/site-packages/pandas/_libs/join.cp311-win_amd64.lib
Normal file
Binary file not shown.
BIN
venv/Lib/site-packages/pandas/_libs/join.cp311-win_amd64.pyd
Normal file
BIN
venv/Lib/site-packages/pandas/_libs/join.cp311-win_amd64.pyd
Normal file
Binary file not shown.
79
venv/Lib/site-packages/pandas/_libs/join.pyi
Normal file
79
venv/Lib/site-packages/pandas/_libs/join.pyi
Normal file
@@ -0,0 +1,79 @@
|
||||
import numpy as np
|
||||
|
||||
from pandas._typing import npt
|
||||
|
||||
def inner_join(
|
||||
left: np.ndarray, # const intp_t[:]
|
||||
right: np.ndarray, # const intp_t[:]
|
||||
max_groups: int,
|
||||
sort: bool = ...,
|
||||
) -> tuple[npt.NDArray[np.intp], npt.NDArray[np.intp]]: ...
|
||||
def left_outer_join(
|
||||
left: np.ndarray, # const intp_t[:]
|
||||
right: np.ndarray, # const intp_t[:]
|
||||
max_groups: int,
|
||||
sort: bool = ...,
|
||||
) -> tuple[npt.NDArray[np.intp], npt.NDArray[np.intp]]: ...
|
||||
def full_outer_join(
|
||||
left: np.ndarray, # const intp_t[:]
|
||||
right: np.ndarray, # const intp_t[:]
|
||||
max_groups: int,
|
||||
) -> tuple[npt.NDArray[np.intp], npt.NDArray[np.intp]]: ...
|
||||
def ffill_indexer(
|
||||
indexer: np.ndarray, # const intp_t[:]
|
||||
) -> npt.NDArray[np.intp]: ...
|
||||
def left_join_indexer_unique(
|
||||
left: np.ndarray, # ndarray[join_t]
|
||||
right: np.ndarray, # ndarray[join_t]
|
||||
) -> npt.NDArray[np.intp]: ...
|
||||
def left_join_indexer(
|
||||
left: np.ndarray, # ndarray[join_t]
|
||||
right: np.ndarray, # ndarray[join_t]
|
||||
) -> tuple[
|
||||
np.ndarray, # np.ndarray[join_t]
|
||||
npt.NDArray[np.intp],
|
||||
npt.NDArray[np.intp],
|
||||
]: ...
|
||||
def inner_join_indexer(
|
||||
left: np.ndarray, # ndarray[join_t]
|
||||
right: np.ndarray, # ndarray[join_t]
|
||||
) -> tuple[
|
||||
np.ndarray, # np.ndarray[join_t]
|
||||
npt.NDArray[np.intp],
|
||||
npt.NDArray[np.intp],
|
||||
]: ...
|
||||
def outer_join_indexer(
|
||||
left: np.ndarray, # ndarray[join_t]
|
||||
right: np.ndarray, # ndarray[join_t]
|
||||
) -> tuple[
|
||||
np.ndarray, # np.ndarray[join_t]
|
||||
npt.NDArray[np.intp],
|
||||
npt.NDArray[np.intp],
|
||||
]: ...
|
||||
def asof_join_backward_on_X_by_Y(
|
||||
left_values: np.ndarray, # ndarray[numeric_t]
|
||||
right_values: np.ndarray, # ndarray[numeric_t]
|
||||
left_by_values: np.ndarray, # const int64_t[:]
|
||||
right_by_values: np.ndarray, # const int64_t[:]
|
||||
allow_exact_matches: bool = ...,
|
||||
tolerance: np.number | float | None = ...,
|
||||
use_hashtable: bool = ...,
|
||||
) -> tuple[npt.NDArray[np.intp], npt.NDArray[np.intp]]: ...
|
||||
def asof_join_forward_on_X_by_Y(
|
||||
left_values: np.ndarray, # ndarray[numeric_t]
|
||||
right_values: np.ndarray, # ndarray[numeric_t]
|
||||
left_by_values: np.ndarray, # const int64_t[:]
|
||||
right_by_values: np.ndarray, # const int64_t[:]
|
||||
allow_exact_matches: bool = ...,
|
||||
tolerance: np.number | float | None = ...,
|
||||
use_hashtable: bool = ...,
|
||||
) -> tuple[npt.NDArray[np.intp], npt.NDArray[np.intp]]: ...
|
||||
def asof_join_nearest_on_X_by_Y(
|
||||
left_values: np.ndarray, # ndarray[numeric_t]
|
||||
right_values: np.ndarray, # ndarray[numeric_t]
|
||||
left_by_values: np.ndarray, # const int64_t[:]
|
||||
right_by_values: np.ndarray, # const int64_t[:]
|
||||
allow_exact_matches: bool = ...,
|
||||
tolerance: np.number | float | None = ...,
|
||||
use_hashtable: bool = ...,
|
||||
) -> tuple[npt.NDArray[np.intp], npt.NDArray[np.intp]]: ...
|
||||
BIN
venv/Lib/site-packages/pandas/_libs/json.cp311-win_amd64.lib
Normal file
BIN
venv/Lib/site-packages/pandas/_libs/json.cp311-win_amd64.lib
Normal file
Binary file not shown.
BIN
venv/Lib/site-packages/pandas/_libs/json.cp311-win_amd64.pyd
Normal file
BIN
venv/Lib/site-packages/pandas/_libs/json.cp311-win_amd64.pyd
Normal file
Binary file not shown.
23
venv/Lib/site-packages/pandas/_libs/json.pyi
Normal file
23
venv/Lib/site-packages/pandas/_libs/json.pyi
Normal file
@@ -0,0 +1,23 @@
|
||||
from collections.abc import Callable
|
||||
from typing import (
|
||||
Any,
|
||||
)
|
||||
|
||||
def ujson_dumps(
|
||||
obj: Any,
|
||||
ensure_ascii: bool = ...,
|
||||
double_precision: int = ...,
|
||||
indent: int = ...,
|
||||
orient: str = ...,
|
||||
date_unit: str = ...,
|
||||
iso_dates: bool = ...,
|
||||
default_handler: None
|
||||
| Callable[[Any], str | float | bool | list | dict | None] = ...,
|
||||
) -> str: ...
|
||||
def ujson_loads(
|
||||
s: str,
|
||||
precise_float: bool = ...,
|
||||
numpy: bool = ...,
|
||||
dtype: None = ...,
|
||||
labelled: bool = ...,
|
||||
) -> Any: ...
|
||||
BIN
venv/Lib/site-packages/pandas/_libs/lib.cp311-win_amd64.lib
Normal file
BIN
venv/Lib/site-packages/pandas/_libs/lib.cp311-win_amd64.lib
Normal file
Binary file not shown.
BIN
venv/Lib/site-packages/pandas/_libs/lib.cp311-win_amd64.pyd
Normal file
BIN
venv/Lib/site-packages/pandas/_libs/lib.cp311-win_amd64.pyd
Normal file
Binary file not shown.
238
venv/Lib/site-packages/pandas/_libs/lib.pyi
Normal file
238
venv/Lib/site-packages/pandas/_libs/lib.pyi
Normal file
@@ -0,0 +1,238 @@
|
||||
# TODO(npdtypes): Many types specified here can be made more specific/accurate;
|
||||
# the more specific versions are specified in comments
|
||||
from collections.abc import (
|
||||
Callable,
|
||||
Generator,
|
||||
Hashable,
|
||||
)
|
||||
from decimal import Decimal
|
||||
from typing import (
|
||||
Any,
|
||||
Final,
|
||||
Literal,
|
||||
TypeAlias,
|
||||
TypeGuard,
|
||||
overload,
|
||||
)
|
||||
|
||||
import numpy as np
|
||||
|
||||
from pandas._typing import (
|
||||
ArrayLike,
|
||||
DtypeObj,
|
||||
npt,
|
||||
)
|
||||
|
||||
# placeholder until we can specify np.ndarray[object, ndim=2]
|
||||
ndarray_obj_2d = np.ndarray
|
||||
|
||||
from enum import Enum
|
||||
|
||||
class _NoDefault(Enum):
|
||||
no_default = ...
|
||||
|
||||
no_default: Final = _NoDefault.no_default
|
||||
NoDefault: TypeAlias = Literal[_NoDefault.no_default]
|
||||
|
||||
i8max: int
|
||||
u8max: int
|
||||
|
||||
def is_np_dtype(dtype: object, kinds: str | None = ...) -> TypeGuard[np.dtype]: ...
|
||||
def item_from_zerodim(val: object) -> object: ...
|
||||
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_pyarrow_array(obj: object) -> bool: ...
|
||||
def is_decimal(obj: object) -> TypeGuard[Decimal]: ...
|
||||
def is_complex(obj: object) -> TypeGuard[complex]: ...
|
||||
def is_bool(obj: object) -> TypeGuard[bool | np.bool_]: ...
|
||||
def is_integer(obj: object) -> TypeGuard[int | np.integer]: ...
|
||||
def is_int_or_none(obj) -> bool: ...
|
||||
def is_float(obj: object) -> TypeGuard[float]: ...
|
||||
def is_interval_array(values: np.ndarray) -> bool: ...
|
||||
def is_datetime64_array(values: np.ndarray, skipna: bool = True) -> bool: ...
|
||||
def is_timedelta_or_timedelta64_array(
|
||||
values: np.ndarray, skipna: bool = True
|
||||
) -> bool: ...
|
||||
def is_datetime_with_singletz_array(values: np.ndarray) -> bool: ...
|
||||
def is_time_array(values: np.ndarray, skipna: bool = ...): ...
|
||||
def is_date_array(values: np.ndarray, skipna: bool = ...): ...
|
||||
def is_datetime_array(values: np.ndarray, skipna: bool = ...): ...
|
||||
def is_string_array(values: np.ndarray, skipna: bool = ...): ...
|
||||
def is_float_array(values: np.ndarray, skipna: bool = ...): ...
|
||||
def is_integer_array(values: np.ndarray, skipna: bool = ...): ...
|
||||
def is_bool_array(values: np.ndarray, skipna: bool = ...): ...
|
||||
def fast_multiget(
|
||||
mapping: dict,
|
||||
keys: np.ndarray, # object[:]
|
||||
default=...,
|
||||
) -> ArrayLike: ...
|
||||
def fast_unique_multiple_list_gen(gen: Generator, sort: bool = ...) -> list: ...
|
||||
@overload
|
||||
def map_infer(
|
||||
arr: np.ndarray,
|
||||
f: Callable[[Any], Any],
|
||||
*,
|
||||
convert: Literal[False],
|
||||
ignore_na: bool = ...,
|
||||
) -> np.ndarray: ...
|
||||
@overload
|
||||
def map_infer(
|
||||
arr: np.ndarray,
|
||||
f: Callable[[Any], Any],
|
||||
*,
|
||||
convert: bool = ...,
|
||||
ignore_na: bool = ...,
|
||||
) -> ArrayLike: ...
|
||||
@overload
|
||||
def maybe_convert_objects(
|
||||
objects: npt.NDArray[np.object_],
|
||||
*,
|
||||
try_float: bool = ...,
|
||||
safe: bool = ...,
|
||||
convert_numeric: bool = ...,
|
||||
convert_non_numeric: Literal[False] = ...,
|
||||
convert_to_nullable_dtype: Literal[False] = ...,
|
||||
dtype_if_all_nat: DtypeObj | None = ...,
|
||||
) -> npt.NDArray[np.object_ | np.number]: ...
|
||||
@overload
|
||||
def maybe_convert_objects(
|
||||
objects: npt.NDArray[np.object_],
|
||||
*,
|
||||
try_float: bool = ...,
|
||||
safe: bool = ...,
|
||||
convert_numeric: bool = ...,
|
||||
convert_non_numeric: bool = ...,
|
||||
convert_to_nullable_dtype: Literal[True] = ...,
|
||||
dtype_if_all_nat: DtypeObj | None = ...,
|
||||
) -> ArrayLike: ...
|
||||
@overload
|
||||
def maybe_convert_objects(
|
||||
objects: npt.NDArray[np.object_],
|
||||
*,
|
||||
try_float: bool = ...,
|
||||
safe: bool = ...,
|
||||
convert_numeric: bool = ...,
|
||||
convert_non_numeric: bool = ...,
|
||||
convert_to_nullable_dtype: bool = ...,
|
||||
dtype_if_all_nat: DtypeObj | None = ...,
|
||||
) -> ArrayLike: ...
|
||||
@overload
|
||||
def maybe_convert_numeric(
|
||||
values: npt.NDArray[np.object_],
|
||||
na_values: set,
|
||||
convert_empty: bool = ...,
|
||||
coerce_numeric: bool = ...,
|
||||
convert_to_masked_nullable: Literal[False] = ...,
|
||||
) -> tuple[np.ndarray, None]: ...
|
||||
@overload
|
||||
def maybe_convert_numeric(
|
||||
values: npt.NDArray[np.object_],
|
||||
na_values: set,
|
||||
convert_empty: bool = ...,
|
||||
coerce_numeric: bool = ...,
|
||||
*,
|
||||
convert_to_masked_nullable: Literal[True],
|
||||
) -> tuple[np.ndarray, np.ndarray]: ...
|
||||
|
||||
# TODO: restrict `arr`?
|
||||
def ensure_string_array(
|
||||
arr,
|
||||
na_value: object = ...,
|
||||
convert_na_value: bool = ...,
|
||||
copy: bool = ...,
|
||||
skipna: bool = ...,
|
||||
) -> npt.NDArray[np.object_]: ...
|
||||
def convert_nans_to_NA(
|
||||
arr: npt.NDArray[np.object_],
|
||||
) -> npt.NDArray[np.object_]: ...
|
||||
def fast_zip(ndarrays: list) -> npt.NDArray[np.object_]: ...
|
||||
|
||||
# TODO: can we be more specific about rows?
|
||||
def to_object_array_tuples(rows: object) -> ndarray_obj_2d: ...
|
||||
def tuples_to_object_array(
|
||||
tuples: npt.NDArray[np.object_],
|
||||
) -> ndarray_obj_2d: ...
|
||||
|
||||
# TODO: can we be more specific about rows?
|
||||
def to_object_array(rows: object, min_width: int = ...) -> ndarray_obj_2d: ...
|
||||
def dicts_to_array(dicts: list, columns: list) -> ndarray_obj_2d: ...
|
||||
def maybe_booleans_to_slice(
|
||||
mask: npt.NDArray[np.uint8],
|
||||
) -> slice | npt.NDArray[np.uint8]: ...
|
||||
def maybe_indices_to_slice(
|
||||
indices: npt.NDArray[np.intp],
|
||||
max_len: int,
|
||||
) -> slice | npt.NDArray[np.intp]: ...
|
||||
def is_all_arraylike(obj: list) -> bool: ...
|
||||
|
||||
# -----------------------------------------------------------------
|
||||
# Functions which in reality take memoryviews
|
||||
|
||||
def memory_usage_of_objects(arr: np.ndarray) -> int: ... # object[:] # np.int64
|
||||
@overload
|
||||
def map_infer_mask(
|
||||
arr: np.ndarray,
|
||||
f: Callable[[Any], Any],
|
||||
mask: np.ndarray, # const uint8_t[:]
|
||||
*,
|
||||
convert: Literal[False],
|
||||
na_value: Any = ...,
|
||||
dtype: np.dtype = ...,
|
||||
) -> np.ndarray: ...
|
||||
@overload
|
||||
def map_infer_mask(
|
||||
arr: np.ndarray,
|
||||
f: Callable[[Any], Any],
|
||||
mask: np.ndarray, # const uint8_t[:]
|
||||
*,
|
||||
convert: bool = ...,
|
||||
na_value: Any = ...,
|
||||
dtype: np.dtype = ...,
|
||||
) -> ArrayLike: ...
|
||||
def indices_fast(
|
||||
index: npt.NDArray[np.intp],
|
||||
labels: np.ndarray, # const int64_t[:]
|
||||
keys: list,
|
||||
sorted_labels: list[npt.NDArray[np.int64]],
|
||||
) -> dict[Hashable, npt.NDArray[np.intp]]: ...
|
||||
def generate_slices(
|
||||
labels: np.ndarray,
|
||||
ngroups: int, # const intp_t[:]
|
||||
) -> tuple[npt.NDArray[np.int64], npt.NDArray[np.int64]]: ...
|
||||
def count_level_2d(
|
||||
mask: np.ndarray, # ndarray[uint8_t, ndim=2, cast=True],
|
||||
labels: np.ndarray, # const intp_t[:]
|
||||
max_bin: int,
|
||||
) -> np.ndarray: ... # np.ndarray[np.int64, ndim=2]
|
||||
def get_level_sorter(
|
||||
codes: np.ndarray, # const int64_t[:]
|
||||
starts: np.ndarray, # const intp_t[:]
|
||||
) -> np.ndarray: ... # np.ndarray[np.intp, ndim=1]
|
||||
def generate_bins_dt64(
|
||||
values: npt.NDArray[np.int64],
|
||||
binner: np.ndarray, # const int64_t[:]
|
||||
closed: object = ...,
|
||||
hasnans: bool = ...,
|
||||
) -> np.ndarray: ... # np.ndarray[np.int64, ndim=1]
|
||||
def array_equivalent_object(
|
||||
left: npt.NDArray[np.object_],
|
||||
right: npt.NDArray[np.object_],
|
||||
) -> bool: ...
|
||||
def has_infs(arr: np.ndarray) -> bool: ... # const floating[:]
|
||||
def has_only_ints_or_nan(arr: np.ndarray) -> bool: ... # const floating[:]
|
||||
def get_reverse_indexer(
|
||||
indexer: np.ndarray, # const intp_t[:]
|
||||
length: int,
|
||||
) -> npt.NDArray[np.intp]: ...
|
||||
def is_bool_list(obj: list) -> bool: ...
|
||||
def dtypes_all_equal(types: list[DtypeObj]) -> bool: ...
|
||||
def is_range_indexer(
|
||||
left: np.ndarray,
|
||||
n: int, # np.ndarray[np.int64, ndim=1]
|
||||
) -> bool: ...
|
||||
def is_sequence_range(
|
||||
sequence: np.ndarray,
|
||||
step: int, # np.ndarray[np.int64, ndim=1]
|
||||
) -> bool: ...
|
||||
BIN
venv/Lib/site-packages/pandas/_libs/missing.cp311-win_amd64.lib
Normal file
BIN
venv/Lib/site-packages/pandas/_libs/missing.cp311-win_amd64.lib
Normal file
Binary file not shown.
BIN
venv/Lib/site-packages/pandas/_libs/missing.cp311-win_amd64.pyd
Normal file
BIN
venv/Lib/site-packages/pandas/_libs/missing.cp311-win_amd64.pyd
Normal file
Binary file not shown.
17
venv/Lib/site-packages/pandas/_libs/missing.pyi
Normal file
17
venv/Lib/site-packages/pandas/_libs/missing.pyi
Normal file
@@ -0,0 +1,17 @@
|
||||
import numpy as np
|
||||
from numpy import typing as npt
|
||||
|
||||
class NAType:
|
||||
def __new__(cls, *args, **kwargs): ...
|
||||
|
||||
NA: NAType
|
||||
|
||||
def is_matching_na(
|
||||
left: object, right: object, nan_matches_none: bool = ...
|
||||
) -> bool: ...
|
||||
def isposinf_scalar(val: object) -> bool: ...
|
||||
def isneginf_scalar(val: object) -> bool: ...
|
||||
def checknull(val: object) -> bool: ...
|
||||
def isnaobj(arr: np.ndarray) -> npt.NDArray[np.bool_]: ...
|
||||
def is_numeric_na(values: np.ndarray) -> npt.NDArray[np.bool_]: ...
|
||||
def is_pdna_or_none(values: np.ndarray) -> npt.NDArray[np.bool_]: ...
|
||||
BIN
venv/Lib/site-packages/pandas/_libs/ops.cp311-win_amd64.lib
Normal file
BIN
venv/Lib/site-packages/pandas/_libs/ops.cp311-win_amd64.lib
Normal file
Binary file not shown.
BIN
venv/Lib/site-packages/pandas/_libs/ops.cp311-win_amd64.pyd
Normal file
BIN
venv/Lib/site-packages/pandas/_libs/ops.cp311-win_amd64.pyd
Normal file
Binary file not shown.
53
venv/Lib/site-packages/pandas/_libs/ops.pyi
Normal file
53
venv/Lib/site-packages/pandas/_libs/ops.pyi
Normal file
@@ -0,0 +1,53 @@
|
||||
from collections.abc import (
|
||||
Callable,
|
||||
Iterable,
|
||||
)
|
||||
from typing import (
|
||||
Any,
|
||||
Literal,
|
||||
TypeAlias,
|
||||
overload,
|
||||
)
|
||||
|
||||
import numpy as np
|
||||
|
||||
from pandas._typing import npt
|
||||
|
||||
_BinOp: TypeAlias = Callable[[Any, Any], Any]
|
||||
_BoolOp: TypeAlias = Callable[[Any, Any], bool]
|
||||
|
||||
def scalar_compare(
|
||||
values: np.ndarray, # object[:]
|
||||
val: object,
|
||||
op: _BoolOp, # {operator.eq, operator.ne, ...}
|
||||
) -> npt.NDArray[np.bool_]: ...
|
||||
def vec_compare(
|
||||
left: npt.NDArray[np.object_],
|
||||
right: npt.NDArray[np.object_],
|
||||
op: _BoolOp, # {operator.eq, operator.ne, ...}
|
||||
) -> npt.NDArray[np.bool_]: ...
|
||||
def scalar_binop(
|
||||
values: np.ndarray, # object[:]
|
||||
val: object,
|
||||
op: _BinOp, # binary operator
|
||||
) -> np.ndarray: ...
|
||||
def vec_binop(
|
||||
left: np.ndarray, # object[:]
|
||||
right: np.ndarray, # object[:]
|
||||
op: _BinOp, # binary operator
|
||||
) -> np.ndarray: ...
|
||||
@overload
|
||||
def maybe_convert_bool(
|
||||
arr: npt.NDArray[np.object_],
|
||||
true_values: Iterable | None = None,
|
||||
false_values: Iterable | None = None,
|
||||
convert_to_masked_nullable: Literal[False] = ...,
|
||||
) -> tuple[np.ndarray, None]: ...
|
||||
@overload
|
||||
def maybe_convert_bool(
|
||||
arr: npt.NDArray[np.object_],
|
||||
true_values: Iterable = ...,
|
||||
false_values: Iterable = ...,
|
||||
*,
|
||||
convert_to_masked_nullable: Literal[True],
|
||||
) -> tuple[np.ndarray, np.ndarray]: ...
|
||||
Binary file not shown.
Binary file not shown.
5
venv/Lib/site-packages/pandas/_libs/ops_dispatch.pyi
Normal file
5
venv/Lib/site-packages/pandas/_libs/ops_dispatch.pyi
Normal file
@@ -0,0 +1,5 @@
|
||||
import numpy as np
|
||||
|
||||
def maybe_dispatch_ufunc_to_dunder_op(
|
||||
self, ufunc: np.ufunc, method: str, *inputs, **kwargs
|
||||
): ...
|
||||
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
BIN
venv/Lib/site-packages/pandas/_libs/parsers.cp311-win_amd64.lib
Normal file
BIN
venv/Lib/site-packages/pandas/_libs/parsers.cp311-win_amd64.lib
Normal file
Binary file not shown.
BIN
venv/Lib/site-packages/pandas/_libs/parsers.cp311-win_amd64.pyd
Normal file
BIN
venv/Lib/site-packages/pandas/_libs/parsers.cp311-win_amd64.pyd
Normal file
Binary file not shown.
77
venv/Lib/site-packages/pandas/_libs/parsers.pyi
Normal file
77
venv/Lib/site-packages/pandas/_libs/parsers.pyi
Normal file
@@ -0,0 +1,77 @@
|
||||
from collections.abc import Hashable
|
||||
from typing import (
|
||||
Literal,
|
||||
)
|
||||
|
||||
import numpy as np
|
||||
|
||||
from pandas._typing import (
|
||||
ArrayLike,
|
||||
Dtype,
|
||||
npt,
|
||||
)
|
||||
|
||||
STR_NA_VALUES: set[str]
|
||||
DEFAULT_BUFFER_HEURISTIC: int
|
||||
|
||||
def sanitize_objects(
|
||||
values: npt.NDArray[np.object_],
|
||||
na_values: set,
|
||||
) -> int: ...
|
||||
|
||||
class TextReader:
|
||||
unnamed_cols: set[str]
|
||||
table_width: int # int64_t
|
||||
leading_cols: int # int64_t
|
||||
header: list[list[int]] # non-negative integers
|
||||
def __init__(
|
||||
self,
|
||||
source,
|
||||
delimiter: bytes | str = ..., # single-character only
|
||||
header=...,
|
||||
header_start: int = ..., # int64_t
|
||||
header_end: int = ..., # uint64_t
|
||||
index_col=...,
|
||||
names=...,
|
||||
tokenize_chunksize: int = ..., # int64_t
|
||||
delim_whitespace: bool = ...,
|
||||
converters=...,
|
||||
skipinitialspace: bool = ...,
|
||||
escapechar: bytes | str | None = ..., # single-character only
|
||||
doublequote: bool = ...,
|
||||
quotechar: str | bytes | None = ..., # at most 1 character
|
||||
quoting: int = ...,
|
||||
lineterminator: bytes | str | None = ..., # at most 1 character
|
||||
comment=...,
|
||||
decimal: bytes | str = ..., # single-character only
|
||||
thousands: bytes | str | None = ..., # single-character only
|
||||
dtype: Dtype | dict[Hashable, Dtype] = ...,
|
||||
usecols=...,
|
||||
error_bad_lines: bool = ...,
|
||||
warn_bad_lines: bool = ...,
|
||||
na_filter: bool = ...,
|
||||
na_values=...,
|
||||
na_fvalues=...,
|
||||
keep_default_na: bool = ...,
|
||||
true_values=...,
|
||||
false_values=...,
|
||||
allow_leading_cols: bool = ...,
|
||||
skiprows=...,
|
||||
skipfooter: int = ..., # int64_t
|
||||
verbose: bool = ...,
|
||||
float_precision: Literal["round_trip", "legacy", "high"] | None = ...,
|
||||
skip_blank_lines: bool = ...,
|
||||
encoding_errors: bytes | str = ...,
|
||||
) -> None: ...
|
||||
def set_noconvert(self, i: int) -> None: ...
|
||||
def remove_noconvert(self, i: int) -> None: ...
|
||||
def close(self) -> None: ...
|
||||
def read(self, rows: int | None = ...) -> dict[int, ArrayLike]: ...
|
||||
def read_low_memory(self, rows: int | None) -> list[dict[int, ArrayLike]]: ...
|
||||
|
||||
# _maybe_upcast, na_values are only exposed for testing
|
||||
na_values: dict
|
||||
|
||||
def _maybe_upcast(
|
||||
arr, use_dtype_backend: bool = ..., dtype_backend: str = ...
|
||||
) -> np.ndarray: ...
|
||||
Binary file not shown.
Binary file not shown.
27
venv/Lib/site-packages/pandas/_libs/properties.pyi
Normal file
27
venv/Lib/site-packages/pandas/_libs/properties.pyi
Normal file
@@ -0,0 +1,27 @@
|
||||
from collections.abc import Sequence
|
||||
from typing import (
|
||||
overload,
|
||||
)
|
||||
|
||||
from pandas._typing import (
|
||||
AnyArrayLike,
|
||||
DataFrame,
|
||||
Index,
|
||||
Series,
|
||||
)
|
||||
|
||||
# note: this is a lie to make type checkers happy (they special
|
||||
# case property). cache_readonly uses attribute names similar to
|
||||
# property (fget) but it does not provide fset and fdel.
|
||||
cache_readonly = property
|
||||
|
||||
class AxisProperty:
|
||||
axis: int
|
||||
def __init__(self, axis: int = ..., doc: str = ...) -> None: ...
|
||||
@overload
|
||||
def __get__(self, obj: DataFrame | Series, type) -> Index: ...
|
||||
@overload
|
||||
def __get__(self, obj: None, type) -> AxisProperty: ...
|
||||
def __set__(
|
||||
self, obj: DataFrame | Series, value: AnyArrayLike | Sequence
|
||||
) -> None: ...
|
||||
BIN
venv/Lib/site-packages/pandas/_libs/reshape.cp311-win_amd64.lib
Normal file
BIN
venv/Lib/site-packages/pandas/_libs/reshape.cp311-win_amd64.lib
Normal file
Binary file not shown.
BIN
venv/Lib/site-packages/pandas/_libs/reshape.cp311-win_amd64.pyd
Normal file
BIN
venv/Lib/site-packages/pandas/_libs/reshape.cp311-win_amd64.pyd
Normal file
Binary file not shown.
16
venv/Lib/site-packages/pandas/_libs/reshape.pyi
Normal file
16
venv/Lib/site-packages/pandas/_libs/reshape.pyi
Normal file
@@ -0,0 +1,16 @@
|
||||
import numpy as np
|
||||
|
||||
from pandas._typing import npt
|
||||
|
||||
def unstack(
|
||||
values: np.ndarray, # reshape_t[:, :]
|
||||
mask: np.ndarray, # const uint8_t[:]
|
||||
stride: int,
|
||||
length: int,
|
||||
width: int,
|
||||
new_values: np.ndarray, # reshape_t[:, :]
|
||||
new_mask: np.ndarray, # uint8_t[:, :]
|
||||
) -> None: ...
|
||||
def explode(
|
||||
values: npt.NDArray[np.object_],
|
||||
) -> tuple[npt.NDArray[np.object_], npt.NDArray[np.int64]]: ...
|
||||
BIN
venv/Lib/site-packages/pandas/_libs/sas.cp311-win_amd64.lib
Normal file
BIN
venv/Lib/site-packages/pandas/_libs/sas.cp311-win_amd64.lib
Normal file
Binary file not shown.
BIN
venv/Lib/site-packages/pandas/_libs/sas.cp311-win_amd64.pyd
Normal file
BIN
venv/Lib/site-packages/pandas/_libs/sas.cp311-win_amd64.pyd
Normal file
Binary file not shown.
7
venv/Lib/site-packages/pandas/_libs/sas.pyi
Normal file
7
venv/Lib/site-packages/pandas/_libs/sas.pyi
Normal file
@@ -0,0 +1,7 @@
|
||||
from pandas.io.sas.sas7bdat import SAS7BDATReader
|
||||
|
||||
class Parser:
|
||||
def __init__(self, parser: SAS7BDATReader) -> None: ...
|
||||
def read(self, nrows: int) -> None: ...
|
||||
|
||||
def get_subheader_index(signature: bytes) -> int: ...
|
||||
BIN
venv/Lib/site-packages/pandas/_libs/sparse.cp311-win_amd64.lib
Normal file
BIN
venv/Lib/site-packages/pandas/_libs/sparse.cp311-win_amd64.lib
Normal file
Binary file not shown.
BIN
venv/Lib/site-packages/pandas/_libs/sparse.cp311-win_amd64.pyd
Normal file
BIN
venv/Lib/site-packages/pandas/_libs/sparse.cp311-win_amd64.pyd
Normal file
Binary file not shown.
51
venv/Lib/site-packages/pandas/_libs/sparse.pyi
Normal file
51
venv/Lib/site-packages/pandas/_libs/sparse.pyi
Normal file
@@ -0,0 +1,51 @@
|
||||
from typing import Self
|
||||
|
||||
import numpy as np
|
||||
|
||||
from pandas._typing import (
|
||||
TakeIndexer,
|
||||
npt,
|
||||
)
|
||||
|
||||
class SparseIndex:
|
||||
length: int
|
||||
npoints: int
|
||||
def __init__(self) -> None: ...
|
||||
@property
|
||||
def ngaps(self) -> int: ...
|
||||
@property
|
||||
def nbytes(self) -> int: ...
|
||||
@property
|
||||
def indices(self) -> npt.NDArray[np.int32]: ...
|
||||
def equals(self, other) -> bool: ...
|
||||
def lookup(self, index: int) -> np.int32: ...
|
||||
def lookup_array(self, indexer: npt.NDArray[np.int32]) -> npt.NDArray[np.int32]: ...
|
||||
def to_int_index(self) -> IntIndex: ...
|
||||
def to_block_index(self) -> BlockIndex: ...
|
||||
def intersect(self, y_: SparseIndex) -> Self: ...
|
||||
def make_union(self, y_: SparseIndex) -> Self: ...
|
||||
|
||||
class IntIndex(SparseIndex):
|
||||
indices: npt.NDArray[np.int32]
|
||||
def __init__(
|
||||
self, length: int, indices: TakeIndexer, check_integrity: bool = ...
|
||||
) -> None: ...
|
||||
|
||||
class BlockIndex(SparseIndex):
|
||||
nblocks: int
|
||||
blocs: np.ndarray
|
||||
blengths: np.ndarray
|
||||
def __init__(
|
||||
self, length: int, blocs: np.ndarray, blengths: np.ndarray
|
||||
) -> None: ...
|
||||
|
||||
# Override to have correct parameters
|
||||
def intersect(self, other: SparseIndex) -> Self: ...
|
||||
def make_union(self, y: SparseIndex) -> Self: ...
|
||||
|
||||
def make_mask_object_ndarray(
|
||||
arr: npt.NDArray[np.object_], fill_value
|
||||
) -> npt.NDArray[np.bool_]: ...
|
||||
def get_blocks(
|
||||
indices: npt.NDArray[np.int32],
|
||||
) -> tuple[npt.NDArray[np.int32], npt.NDArray[np.int32]]: ...
|
||||
BIN
venv/Lib/site-packages/pandas/_libs/testing.cp311-win_amd64.lib
Normal file
BIN
venv/Lib/site-packages/pandas/_libs/testing.cp311-win_amd64.lib
Normal file
Binary file not shown.
BIN
venv/Lib/site-packages/pandas/_libs/testing.cp311-win_amd64.pyd
Normal file
BIN
venv/Lib/site-packages/pandas/_libs/testing.cp311-win_amd64.pyd
Normal file
Binary file not shown.
14
venv/Lib/site-packages/pandas/_libs/testing.pyi
Normal file
14
venv/Lib/site-packages/pandas/_libs/testing.pyi
Normal file
@@ -0,0 +1,14 @@
|
||||
from collections.abc import Mapping
|
||||
|
||||
def assert_dict_equal(a: Mapping, b: Mapping, compare_keys: bool = ...) -> bool: ...
|
||||
def assert_almost_equal(
|
||||
a,
|
||||
b,
|
||||
rtol: float = ...,
|
||||
atol: float = ...,
|
||||
check_dtype: bool = ...,
|
||||
obj=...,
|
||||
lobj=...,
|
||||
robj=...,
|
||||
index_values=...,
|
||||
) -> bool: ...
|
||||
BIN
venv/Lib/site-packages/pandas/_libs/tslib.cp311-win_amd64.lib
Normal file
BIN
venv/Lib/site-packages/pandas/_libs/tslib.cp311-win_amd64.lib
Normal file
Binary file not shown.
BIN
venv/Lib/site-packages/pandas/_libs/tslib.cp311-win_amd64.pyd
Normal file
BIN
venv/Lib/site-packages/pandas/_libs/tslib.cp311-win_amd64.pyd
Normal file
Binary file not shown.
33
venv/Lib/site-packages/pandas/_libs/tslib.pyi
Normal file
33
venv/Lib/site-packages/pandas/_libs/tslib.pyi
Normal file
@@ -0,0 +1,33 @@
|
||||
from datetime import tzinfo
|
||||
|
||||
import numpy as np
|
||||
|
||||
from pandas._typing import npt
|
||||
|
||||
def format_array_from_datetime(
|
||||
values: npt.NDArray[np.int64],
|
||||
tz: tzinfo | None = ...,
|
||||
format: str | None = ...,
|
||||
na_rep: str | float = ...,
|
||||
reso: int = ..., # NPY_DATETIMEUNIT
|
||||
) -> npt.NDArray[np.object_]: ...
|
||||
def first_non_null(values: np.ndarray) -> int: ...
|
||||
def array_to_datetime(
|
||||
values: npt.NDArray[np.object_],
|
||||
errors: str = ...,
|
||||
dayfirst: bool = ...,
|
||||
yearfirst: bool = ...,
|
||||
utc: bool = ...,
|
||||
creso: int = ...,
|
||||
unit_for_numerics: str | None = ...,
|
||||
) -> tuple[np.ndarray, tzinfo | None]: ...
|
||||
|
||||
# returned ndarray may be object dtype or datetime64[ns]
|
||||
|
||||
def array_to_datetime_with_tz(
|
||||
values: npt.NDArray[np.object_],
|
||||
tz: tzinfo,
|
||||
dayfirst: bool,
|
||||
yearfirst: bool,
|
||||
creso: int,
|
||||
) -> npt.NDArray[np.int64]: ...
|
||||
89
venv/Lib/site-packages/pandas/_libs/tslibs/__init__.py
Normal file
89
venv/Lib/site-packages/pandas/_libs/tslibs/__init__.py
Normal file
@@ -0,0 +1,89 @@
|
||||
__all__ = [
|
||||
"BaseOffset",
|
||||
"Day",
|
||||
"IncompatibleFrequency",
|
||||
"NaT",
|
||||
"NaTType",
|
||||
"OutOfBoundsDatetime",
|
||||
"OutOfBoundsTimedelta",
|
||||
"Period",
|
||||
"Resolution",
|
||||
"Tick",
|
||||
"Timedelta",
|
||||
"Timestamp",
|
||||
"add_overflowsafe",
|
||||
"astype_overflowsafe",
|
||||
"delta_to_nanoseconds",
|
||||
"dt64arr_to_periodarr",
|
||||
"dtypes",
|
||||
"get_resolution",
|
||||
"get_supported_dtype",
|
||||
"get_unit_from_dtype",
|
||||
"guess_datetime_format",
|
||||
"iNaT",
|
||||
"ints_to_pydatetime",
|
||||
"ints_to_pytimedelta",
|
||||
"is_date_array_normalized",
|
||||
"is_supported_dtype",
|
||||
"is_unitless",
|
||||
"localize_pydatetime",
|
||||
"nat_strings",
|
||||
"normalize_i8_timestamps",
|
||||
"periods_per_day",
|
||||
"periods_per_second",
|
||||
"to_offset",
|
||||
"tz_compare",
|
||||
"tz_convert_from_utc",
|
||||
"tz_convert_from_utc_single",
|
||||
]
|
||||
|
||||
from pandas._libs.tslibs import dtypes
|
||||
from pandas._libs.tslibs.conversion import localize_pydatetime
|
||||
from pandas._libs.tslibs.dtypes import (
|
||||
Resolution,
|
||||
periods_per_day,
|
||||
periods_per_second,
|
||||
)
|
||||
from pandas._libs.tslibs.nattype import (
|
||||
NaT,
|
||||
NaTType,
|
||||
iNaT,
|
||||
nat_strings,
|
||||
)
|
||||
from pandas._libs.tslibs.np_datetime import (
|
||||
OutOfBoundsDatetime,
|
||||
OutOfBoundsTimedelta,
|
||||
add_overflowsafe,
|
||||
astype_overflowsafe,
|
||||
get_supported_dtype,
|
||||
is_supported_dtype,
|
||||
is_unitless,
|
||||
py_get_unit_from_dtype as get_unit_from_dtype,
|
||||
)
|
||||
from pandas._libs.tslibs.offsets import (
|
||||
BaseOffset,
|
||||
Day,
|
||||
Tick,
|
||||
to_offset,
|
||||
)
|
||||
from pandas._libs.tslibs.parsing import guess_datetime_format
|
||||
from pandas._libs.tslibs.period import (
|
||||
IncompatibleFrequency,
|
||||
Period,
|
||||
)
|
||||
from pandas._libs.tslibs.timedeltas import (
|
||||
Timedelta,
|
||||
delta_to_nanoseconds,
|
||||
ints_to_pytimedelta,
|
||||
)
|
||||
from pandas._libs.tslibs.timestamps import Timestamp
|
||||
from pandas._libs.tslibs.timezones import tz_compare
|
||||
from pandas._libs.tslibs.tzconversion import tz_convert_from_utc_single
|
||||
from pandas._libs.tslibs.vectorized import (
|
||||
dt64arr_to_periodarr,
|
||||
get_resolution,
|
||||
ints_to_pydatetime,
|
||||
is_date_array_normalized,
|
||||
normalize_i8_timestamps,
|
||||
tz_convert_from_utc,
|
||||
)
|
||||
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user