Skip to content

Commit

Permalink
Fix/remove column only when it exists (#105)
Browse files Browse the repository at this point in the history
  • Loading branch information
L-M-Sherlock authored Apr 18, 2024
1 parent 11c4b3f commit 6aa6fd0
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 5 deletions.
2 changes: 1 addition & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ build-backend = "setuptools.build_meta"

[project]
name = "FSRS-Optimizer"
version = "4.27.6"
version = "4.27.7"
readme = "README.md"
dependencies = [
"matplotlib>=3.7.0",
Expand Down
5 changes: 1 addition & 4 deletions src/fsrs_optimizer/fsrs_optimizer.py
Original file line number Diff line number Diff line change
Expand Up @@ -598,8 +598,7 @@ def create_time_series(
1,
)

df["review_duration"] = df["review_duration"].astype(int)
df["review_state"] = df["review_state"].astype(int)
df.drop(columns=["review_duration", "review_state"], inplace=True)

df["review_date"] = pd.to_datetime(df["review_time"] // 1000, unit="s")
df["review_date"] = (
Expand Down Expand Up @@ -690,8 +689,6 @@ def cum_concat(x):
columns=[
"review_time",
"card_id",
"review_duration",
"review_state",
"review_date",
"real_days",
"review_rating",
Expand Down

0 comments on commit 6aa6fd0

Please sign in to comment.