Skip to content

Commit

Permalink
Bug-fix/user-levels-feature (#19)
Browse files Browse the repository at this point in the history
* fixed user levels

Co-authored-by: Román Rey <32899185+rooom13@users.noreply.github.com>
  • Loading branch information
oscarfont and rooom13 authored Nov 28, 2021
1 parent 0aedb1c commit 8a7f32f
Showing 1 changed file with 1 addition and 7 deletions.
8 changes: 1 addition & 7 deletions daily_word_bot/word_bank.py
Original file line number Diff line number Diff line change
Expand Up @@ -36,13 +36,7 @@ def update(self) -> None:

data.pop(0) # discard explanation row
header = data.pop(0)
df = pd.DataFrame(data, columns=header)

cols_de = df.columns[df.columns.str.startswith("Deutsch")].to_list()
cols_es = df.columns[df.columns.str.startswith("Spanisch")].to_list()
cols = ["word_id"] + cols_de + cols_es

df = pd.DataFrame(data, columns=header)[cols].set_index("word_id")
df = pd.DataFrame(data, columns=header).set_index("word_id")
self.df = df
self.last_updated_at = str(datetime.now())

Expand Down

0 comments on commit 8a7f32f

Please sign in to comment.