Returns an SFrame with a new column. The number of elements in the data
        given must match the length of every other column of the SFrame.
        If no name is given, a default name is chosen.

        If inplace == False (default) this operation does not modify the
        current SFrame, returning a new SFrame.

        If inplace == True, this operation modifies the current
        SFrame, returning self.

        Parameters
        ----------
        data : SArray
            The 'column' of data to add.

        column_name : string, optional
            The name of the column. If no name is given, a default name is
            chosen.

        inplace : bool, optional. Defaults to False.
            Whether the SFrame is modified in place.

        Returns
        -------
        out : SFrame
            The current SFrame.

        See Also
        --------
        add_columns

        Examples
        --------
        >>> sf = turicreate.SFrame({'id': [1, 2, 3], 'val': ['A', 'B', 'C']})
        >>> sa = turicreate.SArray(['cat', 'dog', 'fossa'])
        >>> # This line is equivalent to `sf['species'] = sa`
        >>> res = sf.add_column(sa, 'species')
        >>> res
        +----+-----+---------+
        | id | val | species |
        +----+-----+---------+
        | 1  |  A  |   cat   |
        | 2  |  B  |   dog   |
        | 3  |  C  |  fossa  |
        +----+-----+---------+
        [3 rows x 3 columns]

def add_column(self, data, column_name="", inplace=False):
        """
        Returns an SFrame with a new column. The number of elements in the data
        given must match the length of every other column of the SFrame.
        If no name is given, a default name is chosen.

        If inplace == False (default) this operation does not modify the
        current SFrame, returning a new SFrame.

        If inplace == True, this operation modifies the current
        SFrame, returning self.

        Parameters
        ----------
        data : SArray
            The 'column' of data to add.

        column_name : string, optional
            The name of the column. If no name is given, a default name is
            chosen.

        inplace : bool, optional. Defaults to False.
            Whether the SFrame is modified in place.

        Returns
        -------
        out : SFrame
            The current SFrame.

        See Also
        --------
        add_columns

        Examples
        --------
        >>> sf = turicreate.SFrame({'id': [1, 2, 3], 'val': ['A', 'B', 'C']})
        >>> sa = turicreate.SArray(['cat', 'dog', 'fossa'])
        >>> # This line is equivalent to `sf['species'] = sa`
        >>> res = sf.add_column(sa, 'species')
        >>> res
        +----+-----+---------+
        | id | val | species |
        +----+-----+---------+
        | 1  |  A  |   cat   |
        | 2  |  B  |   dog   |
        | 3  |  C  |  fossa  |
        +----+-----+---------+
        [3 rows x 3 columns]
        """
        # Check type for pandas dataframe or SArray?
        
       
        if not isinstance(data, SArray):
            if isinstance(data, _Iterable):
                data = SArray(data)
            else:
                if self.num_columns() == 0:
                    data = SArray([data])
                else:
                    data = SArray.from_const(data, self.num_rows())
    
        if not isinstance(column_name, str):
            raise TypeError("Invalid column name: must be str")

        if inplace:
            ret = self
        else:
            ret = self.copy()

        with cython_context():
            ret.__proxy__.add_column(data.__proxy__, column_name)

        ret._cache = None
        return ret