dycw-utilities 0.109.18__py3-none-any.whl → 0.109.19__py3-none-any.whl
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- {dycw_utilities-0.109.18.dist-info → dycw_utilities-0.109.19.dist-info}/METADATA +1 -1
- {dycw_utilities-0.109.18.dist-info → dycw_utilities-0.109.19.dist-info}/RECORD +7 -7
- utilities/__init__.py +1 -1
- utilities/polars.py +68 -0
- utilities/polars_ols.py +3 -1
- {dycw_utilities-0.109.18.dist-info → dycw_utilities-0.109.19.dist-info}/WHEEL +0 -0
- {dycw_utilities-0.109.18.dist-info → dycw_utilities-0.109.19.dist-info}/licenses/LICENSE +0 -0
@@ -1,4 +1,4 @@
|
|
1
|
-
utilities/__init__.py,sha256=
|
1
|
+
utilities/__init__.py,sha256=NU7I4AynUyg4F6Vu4XytgM7aO4TDKxvPbBFKo638x30,61
|
2
2
|
utilities/altair.py,sha256=Gpja-flOo-Db0PIPJLJsgzAlXWoKUjPU1qY-DQ829ek,9156
|
3
3
|
utilities/astor.py,sha256=xuDUkjq0-b6fhtwjhbnebzbqQZAjMSHR1IIS5uOodVg,777
|
4
4
|
utilities/asyncio.py,sha256=41oQUurWMvadFK5gFnaG21hMM0Vmfn2WS6OpC0R9mas,14757
|
@@ -46,8 +46,8 @@ utilities/pathlib.py,sha256=31WPMXdLIyXgYOMMl_HOI2wlo66MGSE-cgeelk-Lias,1410
|
|
46
46
|
utilities/period.py,sha256=ikHXsWtDLr553cfH6p9mMaiCnIAP69B7q84ckWV3HaA,10884
|
47
47
|
utilities/pickle.py,sha256=Bhvd7cZl-zQKQDFjUerqGuSKlHvnW1K2QXeU5UZibtg,657
|
48
48
|
utilities/platform.py,sha256=NU7ycTvAXAG-fdYmDXaM1m4EOml2cGiaYwaUzfzSqyU,1767
|
49
|
-
utilities/polars.py,sha256=
|
50
|
-
utilities/polars_ols.py,sha256=
|
49
|
+
utilities/polars.py,sha256=UFrD7smyBROlIBaLD6tUFKGAPtwLfyHPHp6dJI9i-kQ,54961
|
50
|
+
utilities/polars_ols.py,sha256=efhXf0gjrHUpQrvS6a7g8yJQJWf_ATKtJnqqF2inCOU,5680
|
51
51
|
utilities/pqdm.py,sha256=foRytQybmOQ05pjt5LF7ANyzrIa--4ScDE3T2wd31a4,3118
|
52
52
|
utilities/py.typed,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
53
53
|
utilities/pydantic.py,sha256=f6qtR5mO2YMuyvNmbaEj5YeD9eGA4YYfb7Bjzh9jUs0,1845
|
@@ -86,7 +86,7 @@ utilities/warnings.py,sha256=yUgjnmkCRf6QhdyAXzl7u0qQFejhQG3PrjoSwxpbHrs,1819
|
|
86
86
|
utilities/whenever.py,sha256=TjoTAJ1R27-rKXiXzdE4GzPidmYqm0W58XydDXp-QZM,17786
|
87
87
|
utilities/zipfile.py,sha256=24lQc9ATcJxHXBPc_tBDiJk48pWyRrlxO2fIsFxU0A8,699
|
88
88
|
utilities/zoneinfo.py,sha256=-DQz5a0Ikw9jfSZtL0BEQkXOMC9yGn_xiJYNCLMiqEc,1989
|
89
|
-
dycw_utilities-0.109.
|
90
|
-
dycw_utilities-0.109.
|
91
|
-
dycw_utilities-0.109.
|
92
|
-
dycw_utilities-0.109.
|
89
|
+
dycw_utilities-0.109.19.dist-info/METADATA,sha256=nYNr6kZIYFI-2yrn7iwBAs_Axo9Zqi5-bKBZpNBc1Q0,13005
|
90
|
+
dycw_utilities-0.109.19.dist-info/WHEEL,sha256=qtCwoSJWgHk21S1Kb4ihdzI2rlJ1ZKaIurTj_ngOhyQ,87
|
91
|
+
dycw_utilities-0.109.19.dist-info/licenses/LICENSE,sha256=gppZp16M6nSVpBbUBrNL6JuYfvKwZiKgV7XoKKsHzqo,1066
|
92
|
+
dycw_utilities-0.109.19.dist-info/RECORD,,
|
utilities/__init__.py
CHANGED
utilities/polars.py
CHANGED
@@ -115,6 +115,7 @@ if TYPE_CHECKING:
|
|
115
115
|
JoinStrategy, # pyright: ignore[reportPrivateImportUsage]
|
116
116
|
JoinValidation, # pyright: ignore[reportPrivateImportUsage]
|
117
117
|
PolarsDataType, # pyright: ignore[reportPrivateImportUsage]
|
118
|
+
RollingInterpolationMethod, # pyright: ignore[reportPrivateImportUsage]
|
118
119
|
SchemaDict, # pyright: ignore[reportPrivateImportUsage]
|
119
120
|
TimeUnit, # pyright: ignore[reportPrivateImportUsage]
|
120
121
|
)
|
@@ -680,6 +681,73 @@ def _cross_or_touch(
|
|
680
681
|
##
|
681
682
|
|
682
683
|
|
684
|
+
@overload
|
685
|
+
def cross_rolling_quantile(
|
686
|
+
expr: ExprLike,
|
687
|
+
up_or_down: Literal["up", "down"],
|
688
|
+
quantile: float,
|
689
|
+
/,
|
690
|
+
*,
|
691
|
+
interpolation: RollingInterpolationMethod = "nearest",
|
692
|
+
window_size: int = 2,
|
693
|
+
weights: list[float] | None = None,
|
694
|
+
min_samples: int | None = None,
|
695
|
+
center: bool = False,
|
696
|
+
) -> Expr: ...
|
697
|
+
@overload
|
698
|
+
def cross_rolling_quantile(
|
699
|
+
expr: Series,
|
700
|
+
up_or_down: Literal["up", "down"],
|
701
|
+
quantile: float,
|
702
|
+
/,
|
703
|
+
*,
|
704
|
+
interpolation: RollingInterpolationMethod = "nearest",
|
705
|
+
window_size: int = 2,
|
706
|
+
weights: list[float] | None = None,
|
707
|
+
min_samples: int | None = None,
|
708
|
+
center: bool = False,
|
709
|
+
) -> Series: ...
|
710
|
+
@overload
|
711
|
+
def cross_rolling_quantile(
|
712
|
+
expr: IntoExprColumn,
|
713
|
+
up_or_down: Literal["up", "down"],
|
714
|
+
quantile: float,
|
715
|
+
/,
|
716
|
+
*,
|
717
|
+
interpolation: RollingInterpolationMethod = "nearest",
|
718
|
+
window_size: int = 2,
|
719
|
+
weights: list[float] | None = None,
|
720
|
+
min_samples: int | None = None,
|
721
|
+
center: bool = False,
|
722
|
+
) -> Expr | Series: ...
|
723
|
+
def cross_rolling_quantile(
|
724
|
+
expr: IntoExprColumn,
|
725
|
+
up_or_down: Literal["up", "down"],
|
726
|
+
quantile: float,
|
727
|
+
/,
|
728
|
+
*,
|
729
|
+
interpolation: RollingInterpolationMethod = "nearest",
|
730
|
+
window_size: int = 2,
|
731
|
+
weights: list[float] | None = None,
|
732
|
+
min_samples: int | None = None,
|
733
|
+
center: bool = False,
|
734
|
+
) -> Expr | Series:
|
735
|
+
"""Compute when a column crosses its rolling quantile."""
|
736
|
+
expr = ensure_expr_or_series(expr)
|
737
|
+
rolling = expr.rolling_quantile(
|
738
|
+
quantile,
|
739
|
+
interpolation=interpolation,
|
740
|
+
window_size=window_size,
|
741
|
+
weights=weights,
|
742
|
+
min_samples=min_samples,
|
743
|
+
center=center,
|
744
|
+
)
|
745
|
+
return cross(expr, up_or_down, rolling)
|
746
|
+
|
747
|
+
|
748
|
+
##
|
749
|
+
|
750
|
+
|
683
751
|
def dataclass_to_dataframe(
|
684
752
|
objs: MaybeIterable[Dataclass],
|
685
753
|
/,
|
utilities/polars_ols.py
CHANGED
@@ -10,7 +10,9 @@ from utilities.functions import is_sequence_of
|
|
10
10
|
from utilities.polars import concat_series, ensure_expr_or_series
|
11
11
|
|
12
12
|
if TYPE_CHECKING:
|
13
|
-
from polars._typing import
|
13
|
+
from polars._typing import (
|
14
|
+
IntoExprColumn, # pyright: ignore[reportPrivateImportUsage]
|
15
|
+
)
|
14
16
|
from polars_ols import NullPolicy
|
15
17
|
|
16
18
|
from utilities.polars import ExprLike
|
File without changes
|
File without changes
|