Reinforcement_Learning_in_Python
Reinforcement_Learning_in_Python copied to clipboard
FutureWarning: The frame.append method is deprecated and will be removed from pandas in a future version. Use pandas.concat instead. self.q_table = self.q_table.append(
DataFrame.Append deprecated and need to be replaced by pandas.concat.
DataFrame.Append: def check_state_exist(self, state): if state not in self.q_table.index: self.q_table = self.q_table.append( pd.Series( [0]*len(self.actions), index=self.q_table.columns, name=state, ) )
Pandas.Concat: def check_state_exist(self, state): if state not in self.q_table.index: self.q_table = pd.concat([self.q_table, pd.Series( [0]*len(self.actions), index=self.q_table.columns, name=state ).to_frame().T],ignore_index=False )