You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
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(
#26
Open
DatTrongNg opened this issue
May 7, 2023
· 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
)
The text was updated successfully, but these errors were encountered:
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
)
The text was updated successfully, but these errors were encountered: