Skip to content

Commit 1395481

Browse files
committed
documentation
1 parent be4bd47 commit 1395481

File tree

1 file changed

+3
-4
lines changed

1 file changed

+3
-4
lines changed

_doc/examples/plot_digitize.py

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@
2323
"""
2424
import warnings
2525
import numpy
26-
from pandas import DataFrame, pivot_table
26+
from pandas import DataFrame, pivot, pivot_table
2727
import matplotlib.pyplot as plt
2828
from onnxruntime import InferenceSession
2929
from sklearn.tree import export_text
@@ -112,9 +112,8 @@
112112
fig, ax = plt.subplots(1, len(n_bins), figsize=(14, 4))
113113

114114
for i, nb in enumerate(n_bins):
115-
piv = pivot_table(data=df[df.n_bins == nb], index="shape",
116-
columns=["name"],
117-
values=["average"])
115+
piv = pivot(data=df[df.n_bins == nb], index="shape",
116+
columns="name", values="average")
118117
piv.plot(title="Benchmark digitize / onnxruntime\nn_bins=%d" % nb,
119118
logx=True, logy=True, ax=ax[i])
120119
plt.show()

0 commit comments

Comments
 (0)