Fixed pandas append deprecation warning

This commit is contained in:
Peter Yefi 2022-04-28 10:58:45 -04:00
parent 574cc2e11c
commit d3a52c8bfc

View File

@ -79,11 +79,13 @@ class WaterToWaterHPParameters:
:param ranges: the range of values to extract :param ranges: the range of values to extract
:return: List :return: List
""" """
data = df.iloc[ranges[0]:ranges[1], columns[0]].append(df.iloc[ranges[0]:ranges[1], columns[1]])\ data = pd.concat([df.iloc[ranges[0]:ranges[1], columns[0]], df.iloc[ranges[0]:ranges[1], columns[1]]])
.append(df.iloc[ranges[0]:ranges[1], columns[2]]) data = pd.concat([df.iloc[ranges[0]:ranges[1], columns[2]], data])
for i in range(1, 5): for i in range(1, 5):
data = data.append(df.iloc[ranges[i]:ranges[i + 1], columns[0]]).append( data = pd.concat([df.iloc[ranges[i]:ranges[i + 1], columns[0]], data])
df.iloc[ranges[i]:ranges[i + 1], columns[1]]).append(df.iloc[ranges[i]:ranges[i + 1], columns[2]]) data = pd.concat([df.iloc[ranges[i]:ranges[i + 1], columns[1]], data])
data = pd.concat([df.iloc[ranges[i]:ranges[i + 1], columns[2]], data])
return data.dropna().values.tolist() return data.dropna().values.tolist()
def _extract_flow_and_ewt(self, df, ranges, columns, flow_rates): def _extract_flow_and_ewt(self, df, ranges, columns, flow_rates):