Skip to content

Commit 978092f

Browse files
author
azaiche
committed
Bug with pandas pivot fixed
1 parent 7682b1c commit 978092f

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

exatomic/core/orbital.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -384,7 +384,7 @@ def square(self, frame=0, column='coef', mocoefs=None, irrep=None):
384384
nchi = (irreps.chi.max() + 1).sum()
385385
cmat = np.zeros((nchi, norb))
386386
for irrep, grp in irreps:
387-
piv = grp.pivot('chi', 'orbital', mocoefs)
387+
piv = grp.pivot_table(index='chi', columns='orbital', values=mocoefs)
388388
ii, jj = piv.shape
389389
cmat[i : i + ii, j : j + jj] = piv.values
390390
i += ii

0 commit comments

Comments
 (0)