Skip to content

Commit

Permalink
Merge branch 'develop' of https://github.com/pnnl/ConStrain into VAV_…
Browse files Browse the repository at this point in the history
…turndown_testing
  • Loading branch information
yunjoonjung-PNNL committed Nov 8, 2024
2 parents 71053f5 + 92650df commit a8638a7
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions constrain/checklib.py
Original file line number Diff line number Diff line change
Expand Up @@ -213,6 +213,9 @@ def all_plot_obo(self, plt_pts, fig_size):
if pt_nan[pt]:
self.df[pt].plot(ax=axx, marker=".")
else:
# check if values in the series are boolean
if self.df[pt].apply(lambda x: isinstance(x, bool)).all():
self.df[pt] = self.df[pt].astype(int)
self.df[pt].plot(ax=axx)
plt.title(f"All samples - {pt} - {self.__class__.__name__}")
i += 1
Expand Down Expand Up @@ -326,6 +329,9 @@ def day_plot_obo(self, plt_pts, fig_size):
if pt_nan[pt]:
plotdaydf[pt].plot(ax=axx, marker=".")
else:
# check if values in the series are boolean
if self.df[pt].apply(lambda x: isinstance(x, bool)).all():
self.df[pt] = self.df[pt].astype(int)
plotdaydf[pt].plot(ax=axx)
plt.title(f"Example day - {pt} - {self.__class__.__name__}")
i += 1
Expand Down

0 comments on commit a8638a7

Please sign in to comment.