Skip to content

Commit

Permalink
Avoid deprecated Pandas API in example
Browse files Browse the repository at this point in the history
  • Loading branch information
lballabio committed Apr 5, 2023
1 parent 7df160d commit 844eb4f
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions Python/examples/american-option.py
Original file line number Diff line number Diff line change
Expand Up @@ -115,8 +115,9 @@
# #### Leif Andersen, Mark Lake and Dimitri Offengenden high performance American engine

# %%
option.setPricingEngine(ql.QdFpAmericanEngine(
process, ql.QdFpAmericanEngine.accurateScheme()))
option.setPricingEngine(
ql.QdFpAmericanEngine(process, ql.QdFpAmericanEngine.accurateScheme())
)
results.append(("QD+ fixed point", option.NPV()))


Expand All @@ -136,7 +137,7 @@

# %%
df = pd.DataFrame(results, columns=["Method", "Option value"])
df.style.hide_index()
df.style.hide(axis="index")

# %% [markdown]
# The following displays the results when this is run as a Python script (in which case the cell above is not displayed).
Expand Down

0 comments on commit 844eb4f

Please sign in to comment.