Reinforcement_Learning_in_Python icon indicating copy to clipboard operation
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(

Open DatTrongNg opened this issue 1 year ago • 0 comments

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 )

DatTrongNg avatar May 07 '23 09:05 DatTrongNg