Skip to content

Commit 7870bea

Browse files
authored
Merge pull request sharebook-kr#263 from mr-yoo/fix/225-pandas-2.2.0
fix: update resampling frequency to end of month and year in resample… (fix sharebook-kr#225)
2 parents 177ee65 + 88b0d1c commit 7870bea

1 file changed

Lines changed: 2 additions & 2 deletions

File tree

pykrx/stock/stock_api.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -47,9 +47,9 @@ def resample_ohlcv(df, freq, how):
4747
"""
4848
if freq != "d" and len(df) > 0:
4949
if freq == "m":
50-
df = df.resample("M").apply(how)
50+
df = df.resample("ME").apply(how)
5151
elif freq == "y":
52-
df = df.resample("Y").apply(how)
52+
df = df.resample("YE").apply(how)
5353
else:
5454
print("choose a freq parameter in ('m', 'y', 'd')")
5555
raise RuntimeError

0 commit comments

Comments
 (0)