def __init__(self, data=None, index=None, columns=None, dtype=None, copy=False):
    if isinstance(data, InternalFrame):
        assert (index is None)
        assert (columns is None)
        assert (dtype is None)
        assert (not copy)
        internal = data
    elif isinstance(data, SparkDataFrame):
        assert (index is None)
        assert (columns is None)
        assert (dtype is None)
        assert (not copy)
        internal = InternalFrame(spark_frame=data, index_spark_columns=None)
    elif isinstance(data, ps.Series):
        assert (index is None)
        assert (columns is None)
        assert (dtype is None)
        assert (not copy)
        data = data.to_frame()
        internal = data._internal
    else:
        if isinstance(data, pd.DataFrame):
            assert (index is None)
            assert (columns is None)
            assert (dtype is None)
            assert (not copy)
            pdf = data
        else:
            pdf = pd.DataFrame(data=data, index=index, columns=columns, dtype=dtype, copy=copy)
        internal = InternalFrame.from_pandas(pdf)
    object.__setattr__(self, '_internal_frame', internal)
def __init__(self, data=None, index=None, columns=None, dtype=None, copy=False):
    if isinstance(data, InternalFrame):
        assert (index is None)
        assert (columns is None)
        assert (dtype is None)
        assert (not copy)
        internal = data
    elif isinstance(data, SparkDataFrame):
        assert (index is None)
        assert (columns is None)
        assert (dtype is None)
        assert (not copy)
        internal = InternalFrame(spark_frame=data, index_spark_columns=None)
    elif isinstance(data, ps.Series):
        assert (index is None)
        assert (columns is None)
        assert (dtype is None)
        assert (not copy)
        data = data.to_frame()
        internal = data._internal
    else:
        if isinstance(data, pd.DataFrame):
            assert (index is None)
            assert (columns is None)
            assert (dtype is None)
            assert (not copy)
            pdf = data
        else:
            pdf = pd.DataFrame(data=data, index=index, columns=columns, dtype=dtype, copy=copy)
        internal = InternalFrame.from_pandas(pdf)
    object.__setattr__(self, '_internal_frame', internal)