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))
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))