Append ``other`` frame to ``self`` frame.
(self, other)
| 816 | self._columns[key].update(rowids, val) |
| 817 | |
| 818 | def _append(self, other): |
| 819 | """Append ``other`` frame to ``self`` frame.""" |
| 820 | # pad columns that are not provided in the other frame with initial values |
| 821 | for key, col in self._columns.items(): |
| 822 | if key in other: |
| 823 | continue |
| 824 | scheme = col.scheme |
| 825 | ctx = F.context(col.data) |
| 826 | if self.get_initializer(key) is None: |
| 827 | self._set_zero_default_initializer() |
| 828 | initializer = self.get_initializer(key) |
| 829 | new_data = initializer( |
| 830 | (other.num_rows,) + scheme.shape, |
| 831 | scheme.dtype, |
| 832 | ctx, |
| 833 | slice(self._num_rows, self._num_rows + other.num_rows), |
| 834 | ) |
| 835 | other[key] = new_data |
| 836 | # append other to self |
| 837 | for key, col in other._columns.items(): |
| 838 | if key not in self._columns: |
| 839 | # the column does not exist; init a new column |
| 840 | self.add_column(key, col.scheme, F.context(col.data)) |
| 841 | self._columns[key].extend(col.data, col.scheme) |
| 842 | |
| 843 | def append(self, other): |
| 844 | """Append another frame's data into this frame. |
no test coverage detected