mirror of
https://github.com/microsoft/qlib.git
synced 2026-07-19 10:24:35 +08:00
pylint code refine & Fix nested example (#848)
* refine code by CI * fix argument error * fix nested eample
This commit is contained in:
@@ -212,7 +212,8 @@ class PortfolioMetrics:
|
||||
path: str/ pathlib.Path()
|
||||
"""
|
||||
path = pathlib.Path(path)
|
||||
r = pd.read_csv(open(path, "rb"), index_col=0)
|
||||
with path.open("rb") as f:
|
||||
r = pd.read_csv(f, index_col=0)
|
||||
r.index = pd.DatetimeIndex(r.index)
|
||||
|
||||
index = r.index
|
||||
|
||||
Reference in New Issue
Block a user