Skip to content

Commit bfccc5f

Browse files
authored
Merge pull request #285 from azaichen/main
Bug with pandas pivot fixed
2 parents f7bf144 + 978092f commit bfccc5f

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)