Skip to content

Commit

Permalink
table: fix pandas deprecation warning
Browse files Browse the repository at this point in the history
drp_stella/python/pfs/drp/stella/table.py:147: FutureWarning: The frame.append method is deprecated and will be removed from pandas in a future version. Use pandas.concat instead.
drp_stella/python/pfs/drp/stella/table.py:140: FutureWarning: The frame.append method is deprecated and will be removed from pandas in a future version. Use pandas.concat instead.
  • Loading branch information
PaulPrice committed May 25, 2022
1 parent 5a252d7 commit 7e3852c
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions python/pfs/drp/stella/table.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
from typing import Iterable, Tuple, Type, TypeVar, Dict, List, Iterator, Union, Any

import numpy as np
from pandas import DataFrame
from pandas import DataFrame, concat
import astropy.io.fits


Expand Down Expand Up @@ -137,14 +137,14 @@ def extend(self, other: Table):
other : `TableBase`
Table to use to extend this table.
"""
self.data = self.data.append(other.data)
self.data = concat((self.data, other.data))

def __add__(self, rhs: Table) -> Table:
"""Addition
This is an inefficient way of populating a table.
"""
return type(self)(self.data.append(rhs.data))
return type(self)(concat((self.data, rhs.data)))

def __iadd__(self, rhs: Table) -> Table:
"""In-place addition
Expand Down

0 comments on commit 7e3852c

Please sign in to comment.