NREL/OpenOA

Fix Project ENGIE Cleaning and Pandas Nested `.loc` Warning

Closed this issue · 0 comments

There are two overlapping issues that can't be disentangled, and should be addressed simultaneously:

  1. Pandas will eventually stop supporting nested indexing as it cleans up its backend.
  2. In the v3 cleanup, a reassignment in a nested .loc was improperly removed see project_ENGIE.py:98.

Both should be rewritten to the form of, but in 2) the = np.nan is missing:

scada_df.loc[ix_flag.loc[ix_flag["<focal_column>"]].index, sensor_cols] = np.nan

The change in form won't the results, however, because in line 99 of the current file the assignment part of the expression is missing, our results will naturally change, and as a result, may be where some of our change in results earlier on were stemming from.