Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Small bug fix to remove hard-coded directory paths #28

Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions scripts/read_data.py
Original file line number Diff line number Diff line change
Expand Up @@ -234,7 +234,7 @@ def download_puf(data_dir="../data/", all_columns=True , output_format="feather"
_download_data(url, data_dir=data_dir, data_name="puf.zip", zipped_data=True)

# read CSV into DataFrame
puf = pd.read_csv("../data/2010_PD_Profiles_PUF.csv")
puf = pd.read_csv(data_dir + "2010_PD_Profiles_PUF.csv")

# if we don't want to save all columns, drop those except for the three columns
# we're interested in.
Expand Down Expand Up @@ -293,7 +293,7 @@ def download_rxnorm(data_dir="../data/", output_format="feather"):
"SAUI", "SCUI", "SDUI", "SAB", "TTY", "CODE", "STR", "SRL", "SUPPRESS", "CVF"]

# we only want column 0 (the RXCUI identifier) and 14 (the commonly used name)
rxnorm = pd.read_csv("../data/rrf/RXNCONSO.RRF", sep="|", names=names, index_col=False,
rxnorm = pd.read_csv(data_dir + "rrf/RXNCONSO.RRF", sep="|", names=names, index_col=False,
usecols=[0,14])

# make all strings lowercase
Expand Down