Open TysonSir opened 1 year ago
thanks a lot
I use this code instead
def check_state_exist(self, state):
if state not in self.q_table.index:
# append new state to q table
new_state = pd.DataFrame(
[[0*i for i in range(len(self.actions))]],
columns=self.q_table.columns,
index=[state],
)
self.q_table = pd.concat([self.q_table, new_state], ignore_index=False)
pandas==1.4.4 FutureWarning解决
警告内容
原代码
新代码