pytrendy 2.0.0.dev1__py3-none-any.whl → 2.0.0.dev2__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.
- pytrendy/post_processing/segments_analyse.py +2 -1
- {pytrendy-2.0.0.dev1.dist-info → pytrendy-2.0.0.dev2.dist-info}/METADATA +1 -1
- {pytrendy-2.0.0.dev1.dist-info → pytrendy-2.0.0.dev2.dist-info}/RECORD +5 -5
- {pytrendy-2.0.0.dev1.dist-info → pytrendy-2.0.0.dev2.dist-info}/WHEEL +0 -0
- {pytrendy-2.0.0.dev1.dist-info → pytrendy-2.0.0.dev2.dist-info}/licenses/LICENSE +0 -0
|
@@ -40,7 +40,7 @@ def analyse_segments(df: pd.DataFrame, value_col: str, segments: list[dict]) ->
|
|
|
40
40
|
Returns:
|
|
41
41
|
list:
|
|
42
42
|
A list of enhanced segment dictionaries with additional keys:
|
|
43
|
-
- `'total_change'`, `'pct_change'`, `'days'`, `'SNR'`, `'change_rank'`
|
|
43
|
+
- `'total_change'`, `'pct_change'`, `'mltp_change'`, `'days'`, `'SNR'`, `'change_rank'`
|
|
44
44
|
"""
|
|
45
45
|
segments_enhanced = []
|
|
46
46
|
for segment in segments:
|
|
@@ -51,6 +51,7 @@ def analyse_segments(df: pd.DataFrame, value_col: str, segments: list[dict]) ->
|
|
|
51
51
|
val_start = df_segment[value_col].iloc[0]
|
|
52
52
|
val_end = df_segment[value_col].iloc[-1]
|
|
53
53
|
segment_enhanced['pct_change'] = (float(val_end / val_start - 1) if val_start != 0 else np.nan)
|
|
54
|
+
segment_enhanced['mltp_change'] = (float(val_end / val_start) if val_start != 0 else np.nan)
|
|
54
55
|
|
|
55
56
|
# Calculate days & cumulative total change
|
|
56
57
|
days = segment['end'] - segment['start']
|
|
@@ -8,7 +8,7 @@ pytrendy/io/plot_pytrendy.py,sha256=U2tPKypgfYXnfixS2loB1JZETA3dot-bvmA_xNu4gK0,
|
|
|
8
8
|
pytrendy/io/prepare_index.py,sha256=QTquO_iktcx6UKRduVfdT5oTBlHJtStGMJnniBG4f-Q,8345
|
|
9
9
|
pytrendy/io/results_pytrendy.py,sha256=h5Frarg6FpCORHP3s7a7t85lBkv8A0n0OqXc3yFFyNw,8384
|
|
10
10
|
pytrendy/post_processing/__init__.py,sha256=bvn1pcxRAoyq5C1P7v5gnb6HiPzteyxT3y9dOY8Pemc,2569
|
|
11
|
-
pytrendy/post_processing/segments_analyse.py,sha256=
|
|
11
|
+
pytrendy/post_processing/segments_analyse.py,sha256=qkZHWQTl1LRz0W81VQdvO9yPgDwbp7Gj4wFZeOE6Rw4,3188
|
|
12
12
|
pytrendy/post_processing/segments_get.py,sha256=A7fc2BPkEPTOUCDX7R3eX-6mWmQV8YKIS-I70ji7Ev0,2552
|
|
13
13
|
pytrendy/post_processing/segments_refine/__init__.py,sha256=Mcv4xfV442j1TE3udmRRyTjKNFrSE8brcNlzWMJvkMc,3501
|
|
14
14
|
pytrendy/post_processing/segments_refine/abrupt_shaving.py,sha256=5e0dS0yQ51wT2Hvogm0MdGHjq-3F7aG7jutygmu1VM4,7378
|
|
@@ -19,7 +19,7 @@ pytrendy/post_processing/segments_refine/trend_classify.py,sha256=aJwutjfMz64t7f
|
|
|
19
19
|
pytrendy/post_processing/segments_refine/update_neighbours.py,sha256=4MqOEllUADv8W5nBwfGL3NZNlM9cEYwh3ohb3VWIWU8,3784
|
|
20
20
|
pytrendy/process_signals.py,sha256=eE7gpnagkNuIcWDKxMvq8tdiv15XrK7rbOqcF_Tdg3c,11564
|
|
21
21
|
pytrendy/simpledtw.py,sha256=tGsbnRgh4VqnA5XVxPCfYHnJXjvLlVHVGHQ4cGX4eUw,2945
|
|
22
|
-
pytrendy-2.0.0.
|
|
23
|
-
pytrendy-2.0.0.
|
|
24
|
-
pytrendy-2.0.0.
|
|
25
|
-
pytrendy-2.0.0.
|
|
22
|
+
pytrendy-2.0.0.dev2.dist-info/METADATA,sha256=EcbKrHtCML6KZKiq-vVIftrRFabYiIjTYQNhbMzOY0A,8684
|
|
23
|
+
pytrendy-2.0.0.dev2.dist-info/WHEEL,sha256=EGEvSphFYqXKs23-kQBeyNoJP1nrT8ZJKQoi5p5DYL8,88
|
|
24
|
+
pytrendy-2.0.0.dev2.dist-info/licenses/LICENSE,sha256=I00f93GihSG6Gqqw3qerxzO53oj_crz0sjynXCiHX_0,1079
|
|
25
|
+
pytrendy-2.0.0.dev2.dist-info/RECORD,,
|
|
File without changes
|
|
File without changes
|