# Buggy code
def append(
    self,
    other: "DataFrame",
    ignore_index: bool = False,
    verify_integrity: bool = False,
    sort: bool = False,
) -> "DataFrame":
    """
    Append rows of other to the end of caller, returning a new object.

    Columns in other that are not in the caller are added as new columns.

    Parameters
    ----------
    other : DataFrame or Series/dict-like object, or list of these
        The data to append.

    ignore_index : boolean, default False
        If True, do not use the index labels.

    verify_integrity : boolean, default False
        If True, raise ValueError on creating index with duplicates.

    sort : boolean, default False
        Currently not supported.

    Returns
    -------
    appended : DataFrame

    Examples
    --------
    >>> df = ks.DataFrame([[1, 2], [3, 4]], columns=list('AB'))

    >>> df.append(df)
       A  B
    0  1  2
    1  3  4
    0  1  2
    1  3  4

    >>> df.append(df, ignore_index=True)
       A  B
    0  1  2
    1  3  4
    2  1  2
    3  3  4
    """
    if isinstance(other, ks.Series):
        raise ValueError(
            "DataFrames.append() does not support appending Series to DataFrames"
        )
    if sort:
        raise ValueError("The 'sort' parameter is currently not supported")

    if not ignore_index:
        index_columns = self._internal.index_columns
        if len(index_columns) != len(other._internal.index_columns):
            raise ValueError(
                "Both DataFrames have to have the same number of index levels"
            )

        if verify_integrity and len(index_columns) > 0:
            if (
                self._sdf.select(index_columns)
                .intersect(other._sdf.select(other._internal.index_columns))
                .count()
            ) > 0:
                raise ValueError("Indices have overlapping values")

    # Lazy import to avoid circular dependency issues
    from databricks.koalas.namespace import concat

    return concat([self, other], ignore_index=ignore_index)


# Traceback (KeyError)
df = ks.read_parquet("/mnt/ivan/sample.parquet")
df['a.b']

# KeyError: 'a.b'
# ---------------------------------------------------------------------------
# KeyError                                  Traceback (most recent call last)
# <command-3188040896828876> in <module>()
#       1 df = ks.read_parquet("/mnt/ivan/sample.parquet")
# ----> 2 df['a.b']
#
# /databricks/python/lib/python3.5/site-packages/databricks/koalas/frame.py in __getitem__(self, key)
#     448
#     449     def __getitem__(self, key):
# --> 450         return self._pd_getitem(key)
#     451
#     452     def __setitem__(self, key, value):
#
# /databricks/python/lib/python3.5/site-packages/databricks/koalas/frame.py in _pd_getitem(self, key)
#     427                 return Series(self._sdf.__getitem__(key), self, self._metadata.index_info)
#     428             except AnalysisException:
# --> 429                 raise KeyError(key)
#     430         if np.isscalar(key) or isinstance(key, (tuple, string_types)):
#     431             raise NotImplementedError(key)
#
# KeyError: 'a.b'

# Fixed code
def append(
    self,
    other: "DataFrame",
    ignore_index: bool = False,
    verify_integrity: bool = False,
    sort: bool = False,
) -> "DataFrame":
    """
    Append rows of other to the end of caller, returning a new object.

    Columns in other that are not in the caller are added as new columns.

    Parameters
    ----------
    other : DataFrame or Series/dict-like object, or list of these
        The data to append.

    ignore_index : boolean, default False
        If True, do not use the index labels.

    verify_integrity : boolean, default False
        If True, raise ValueError on creating index with duplicates.

    sort : boolean, default False
        Currently not supported.

    Returns
    -------
    appended : DataFrame

    Examples
    --------
    >>> df = ks.DataFrame([[1, 2], [3, 4]], columns=list('AB'))

    >>> df.append(df)
       A  B
    0  1  2
    1  3  4
    0  1  2
    1  3  4

    >>> df.append(df, ignore_index=True)
       A  B
    0  1  2
    1  3  4
    2  1  2
    3  3  4
    """
    if isinstance(other, ks.Series):
        raise ValueError(
            "DataFrames.append() does not support appending Series to DataFrames"
        )
    if sort:
        raise ValueError("The 'sort' parameter is currently not supported")

    if not ignore_index:
        index_scols = self._internal.index_scols
        if len(index_scols) != len(other._internal.index_scols):
            raise ValueError(
                "Both DataFrames have to have the same number of index levels"
            )

        if verify_integrity and len(index_scols) > 0:
            if (
                self._sdf.select(index_scols)
                .intersect(other._sdf.select(other._internal.index_scols))
                .count()
            ) > 0:
                raise ValueError("Indices have overlapping values")

    # Lazy import to avoid circular dependency issues
    from databricks.koalas.namespace import concat

    return concat([self, other], ignore_index=ignore_index)