pymatgen
pymatgen copied to clipboard
LAMMPS IO: update to accomodate pandas deprecation
Describe the bug
Several lines in pymatgen.io.lammps.data.py
make use of the pandas DataFrame.append
method, which is being deprecated, causing many warnings along the lines of:
/Users/ryan/miniconda3/envs/md/code/pymatgen/pymatgen/io/lammps/data.py:1283:
FutureWarning: The frame.append method is deprecated and will be removed from pandas in a future version.
Use pandas.concat instead.
self.atoms = self.atoms.append(atoms_df, ignore_index=True)
/Users/ryan/miniconda3/envs/md/code/pymatgen/pymatgen/io/lammps/data.py:1307:
FutureWarning: The frame.append method is deprecated and will be removed from pandas in a future version.
Use pandas.concat instead.
self.topology[kw] = self.topology[kw].append(topo_df, ignore_index=True)
when creating CombinedData
objects. These calls should be replaced with pd.concat
as directed by the warning. Note that there may be other instances of DataFrame.append
beyond the two lines referenced - these are just two that I encountered in my work recently.
Thanks. Go ahead and submit a PR to fix this.
@manaslkht would you be able to tackle this?
@rkingsbury Yes, will get this done by this weekend.