Closed nicenoize closed 4 years ago
Just update your pandas
library to version 0.21 or higher.
pip install -U pandas==0.21
Yes, just updating pandas to the version in the requirements.txt would solve the issue. This issue happens because recently I replaced the old deprecated function rename_axis
.
Hey! When trying to perform step 4) and run the script to extract the episodes, I receive a type error, which is caused by rename() being called with "axis" as argument. According to the pandas documentary, axis is a valid argument. Does anybody else have this problem and came up with a fix for it? Here's the Traceback:
Traceback (most recent call last): File "/Users/nicenoize/anaconda3/lib/python3.6/runpy.py", line 193, in _run_module_as_main "__main__", mod_spec) File "/Users/nicenoize/anaconda3/lib/python3.6/runpy.py", line 85, in _run_code exec(code, run_globals) File "/Volumes/Backup/COP/mimic3-benchmarks/mimic3benchmark/scripts/extract_episodes_from_subjects.py", line 26, in <module> var_map = read_itemid_to_variable_map(args.variable_map_file) File "/Volumes/Backup/COP/mimic3-benchmarks/mimic3benchmark/preprocessing.py", line 119, in read_itemid_to_variable_map return var_map.rename({variable_column: 'VARIABLE', 'MIMIC LABEL': 'MIMIC_LABEL'}, axis=1) File "/Users/nicenoize/anaconda3/lib/python3.6/site-packages/pandas/core/frame.py", line 2746, in rename **kwargs) File "/Users/nicenoize/anaconda3/lib/python3.6/site-packages/pandas/core/generic.py", line 694, in rename 'argument "{0}"'.format(list(kwargs.keys())[0]))