Skip to content

Commit 34b04f4

Browse files
committed
Fix FutureWarning for pandas frequency aliases
- Updated make_index default rebalance from '1M' to '1ME' - Removed warning suppression in _compat.py - Ensures clean execution with pandas 2.2.0+ - Bumped version to 0.0.75
1 parent c15e496 commit 34b04f4

File tree

3 files changed

+11
-3
lines changed

3 files changed

+11
-3
lines changed

CHANGELOG.md

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,14 @@
11
Changelog
22
===========
33

4+
0.0.75
5+
------
6+
7+
- Fixed FutureWarning for deprecated pandas frequency aliases:
8+
- Updated make_index default rebalance parameter from "1M" to "1ME"
9+
- Ensures compatibility with pandas 2.2.0+ without warnings
10+
- The _compat module already handles conversion for older pandas versions
11+
412
0.0.74
513
------
614

quantstats/utils.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -839,7 +839,7 @@ def _score_str(val):
839839

840840

841841
def make_index(
842-
ticker_weights, rebalance="1M", period="max", returns=None, match_dates=False
842+
ticker_weights, rebalance="1ME", period="max", returns=None, match_dates=False
843843
):
844844
"""
845845
Makes an index out of the given tickers and weights.
@@ -906,7 +906,7 @@ def make_index(
906906
)
907907

908908
# Clean up temporary columns
909-
index = index.drop(columns=["first_day"])
909+
index = index.drop(columns=["first_day", "break"])
910910

911911
# Remove rows where all values are NaN
912912
index = index.dropna(how="all")

quantstats/version.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
version = "0.0.74"
1+
version = "0.0.75"

0 commit comments

Comments
 (0)