def _update_internal_frame(self, internal: InternalFrame, requires_same_anchor: bool=True) -> None:
    '\n        Update InternalFrame with the given one.\n\n        If the column_label is changed or the new InternalFrame is not the same `anchor`,\n        disconnect the link to the Series and create a new one.\n\n        If `requires_same_anchor` is `False`, checking whether or not the same anchor is ignored\n        and force to update the InternalFrame, e.g., replacing the internal with the resolved_copy,\n        updating the underlying Spark DataFrame which need to combine a different Spark DataFrame.\n\n        :param internal: the new InternalFrame\n        :param requires_same_anchor: whether checking the same anchor\n        '
    from pyspark.pandas.series import Series
    if hasattr(self, '_psseries'):
        psseries = {}
        for (old_label, new_label) in zip_longest(self._internal.column_labels, internal.column_labels):
            if (old_label is not None):
                psser = self._pssers[old_label]
                renamed = (old_label != new_label)
                not_same_anchor = (requires_same_anchor and (not same_anchor(internal, psser)))
                if (renamed or not_same_anchor):
                    psdf: DataFrame = DataFrame(self._internal.select_column(old_label))
                    psser._update_anchor(psdf)
                    psser = None
            else:
                psser = None
            if (new_label is not None):
                if (psser is None):
                    psser = Series(data=self, index=new_label)
                psseries[new_label] = psser
        self._psseries = psseries
    self._internal_frame = internal
    if hasattr(self, '_repr_pandas_cache'):
        del self._repr_pandas_cache
Update InternalFrame with the given one.

If the column_label is changed or the new InternalFrame is not the same `anchor`,
disconnect the link to the Series and create a new one.

If `requires_same_anchor` is `False`, checking whether or not the same anchor is ignored
and force to update the InternalFrame, e.g., replacing the internal with the resolved_copy,
updating the underlying Spark DataFrame which need to combine a different Spark DataFrame.

:param internal: the new InternalFrame
:param requires_same_anchor: whether checking the same anchor
def _update_internal_frame(self, internal: InternalFrame, requires_same_anchor: bool=True) -> None:
    '\n        Update InternalFrame with the given one.\n\n        If the column_label is changed or the new InternalFrame is not the same `anchor`,\n        disconnect the link to the Series and create a new one.\n\n        If `requires_same_anchor` is `False`, checking whether or not the same anchor is ignored\n        and force to update the InternalFrame, e.g., replacing the internal with the resolved_copy,\n        updating the underlying Spark DataFrame which need to combine a different Spark DataFrame.\n\n        :param internal: the new InternalFrame\n        :param requires_same_anchor: whether checking the same anchor\n        '
    from pyspark.pandas.series import Series
    if hasattr(self, '_psseries'):
        psseries = {}
        for (old_label, new_label) in zip_longest(self._internal.column_labels, internal.column_labels):
            if (old_label is not None):
                psser = self._pssers[old_label]
                renamed = (old_label != new_label)
                not_same_anchor = (requires_same_anchor and (not same_anchor(internal, psser)))
                if (renamed or not_same_anchor):
                    psdf: DataFrame = DataFrame(self._internal.select_column(old_label))
                    psser._update_anchor(psdf)
                    psser = None
            else:
                psser = None
            if (new_label is not None):
                if (psser is None):
                    psser = Series(data=self, index=new_label)
                psseries[new_label] = psser
        self._psseries = psseries
    self._internal_frame = internal
    if hasattr(self, '_repr_pandas_cache'):
        del self._repr_pandas_cache