diff --git a/README.md b/README.md index a5087c1..2769a3f 100644 --- a/README.md +++ b/README.md @@ -59,6 +59,7 @@ After cloning this repository and installing (and running) Docker as well as Ana ```$ conda env create -f dg3n.yml``` - This will create the conda environment needed to run the dgen model. +- The dgen model is optimized for Python v3 and above. Run ```$ conda list ``` to verify you have this version. 2. This command will create a container with PostgreSQL initialized. diff --git a/dgen_os/python/dg3n.yml b/dgen_os/python/dg3n.yml index 7d6ffc8..c0ab273 100644 --- a/dgen_os/python/dg3n.yml +++ b/dgen_os/python/dg3n.yml @@ -5,14 +5,13 @@ channels: - anaconda - nrel dependencies: - - python=3 - colorama - colorlog - requests - matplotlib - numpy - openpyxl - - pandas=1.1.5 + - pandas - pyarrow - psutil - psycopg2 @@ -20,4 +19,4 @@ dependencies: - spyder - sqlalchemy - nrel-pysam 2.1.4 - - nrel-pysam-stubs 2.1.4 \ No newline at end of file + - nrel-pysam-stubs 2.1.4 diff --git a/dgen_os/python/dgen_model.py b/dgen_os/python/dgen_model.py index 5a7056a..f09f865 100644 --- a/dgen_os/python/dgen_model.py +++ b/dgen_os/python/dgen_model.py @@ -25,7 +25,14 @@ #============================================================================== pd.set_option('mode.chained_assignment', None) #============================================================================== +# Suppress warnings from Pandas +'''Should be re-visted if/when Pandas supports psycopg2 or when work can be done +to update code to use SQLalchemy instead''' +import warnings + +warnings.simplefilter("ignore") +#============================================================================== def main(mode = None, resume_year = None, endyear = None, ReEDS_inputs = None): """ diff --git a/dgen_os/python/input_data_functions.py b/dgen_os/python/input_data_functions.py index d32ac99..107786e 100644 --- a/dgen_os/python/input_data_functions.py +++ b/dgen_os/python/input_data_functions.py @@ -319,7 +319,7 @@ def deprec_schedule(df): for year in missing_years: last_entry['year'] = year - df = df.append(last_entry) + df = pd.concat([df,last_entry], ignore_index=True, sort=False) return df.loc[:,['year','sector_abbr','deprec_sch']]