Skip to content

Commit

Permalink
closes #1557
Browse files Browse the repository at this point in the history
  • Loading branch information
CamDavidsonPilon committed Sep 13, 2023
1 parent c32ce59 commit 003de09
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions lifelines/datasets/__init__.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# -*- coding: utf-8 -*-
import pandas as pd
from pkg_resources import resource_filename
from importlib import resources


def _load_dataset(filename, **kwargs):
Expand All @@ -18,7 +18,7 @@ def _load_dataset(filename, **kwargs):
-------
output: DataFrame
"""
return pd.read_csv(resource_filename("lifelines", "datasets/" + filename), engine="python", **kwargs)
return pd.read_csv(resources.files("lifelines") / "datasets" / filename, engine="python", **kwargs)


def load_recur(**kwargs):
Expand Down

0 comments on commit 003de09

Please sign in to comment.