@classmethod<EOL><INDENT>def from_items(cls, items, columns=None, orient='<STR_LIT>'):<DEDENT>
warnings.warn("<STR_LIT>"<EOL>"<STR_LIT>"<EOL>"<STR_LIT>"<EOL>"<STR_LIT>",<EOL>FutureWarning, stacklevel=<NUM_LIT:2>)<EOL>keys, values = lzip(*items)<EOL>if orient == '<STR_LIT>':<EOL><INDENT>if columns is not None:<EOL><INDENT>columns = ensure_index(columns)<EOL>idict = dict(items)<EOL>if len(idict) < len(items):<EOL><INDENT>if not columns.equals(ensure_index(keys)):<EOL><INDENT>raise ValueError('<STR_LIT>'<EOL>'<STR_LIT>')<EOL><DEDENT>arrays = values<EOL><DEDENT>else:<EOL><INDENT>arrays = [idict[k] for k in columns if k in idict]<EOL><DEDENT><DEDENT>else:<EOL><INDENT>columns = ensure_index(keys)<EOL>arrays = values<EOL><DEDENT>try:<EOL><INDENT>return cls._from_arrays(arrays, columns, None)<EOL><DEDENT>except ValueError:<EOL><INDENT>if not is_nested_list_like(values):<EOL><INDENT>raise ValueError('<STR_LIT>'<EOL>'<STR_LIT>')<EOL><DEDENT><DEDENT><DEDENT>elif orient == '<STR_LIT:index>':<EOL><INDENT>if columns is None:<EOL><INDENT>raise TypeError("<STR_LIT>")<EOL><DEDENT>keys = ensure_index(keys)<EOL>try:<EOL><INDENT>arr = np.array(values, dtype=object).T<EOL>data = [lib.maybe_convert_objects(v) for v in arr]<EOL>return cls._from_arrays(data, columns, keys)<EOL><DEDENT>except TypeError:<EOL><INDENT>if not is_nested_list_like(values):<EOL><INDENT>raise ValueError('<STR_LIT>'<EOL>'<STR_LIT>')<EOL><DEDENT><DEDENT><DEDENT>else:  <EOL><INDENT>raise ValueError("<STR_LIT>")<EOL><DEDENT>
Construct a DataFrame from a list of tuples.

.. deprecated:: 0.23.0
  `from_items` is deprecated and will be removed in a future version.
  Use :meth:`DataFrame.from_dict(dict(items)) <DataFrame.from_dict>`
  instead.
  :meth:`DataFrame.from_dict(OrderedDict(items)) <DataFrame.from_dict>`
  may be used to preserve the key order.

Convert (key, value) pairs to DataFrame. The keys will be the axis
index (usually the columns, but depends on the specified
orientation). The values should be arrays or Series.

Parameters
----------
items : sequence of (key, value) pairs
    Values should be arrays or Series.
columns : sequence of column labels, optional
    Must be passed if orient='index'.
orient : {'columns', 'index'}, default 'columns'
    The "orientation" of the data. If the keys of the
    input correspond to column labels, pass 'columns'
    (default). Otherwise if the keys correspond to the index,
    pass 'index'.

Returns
-------
DataFrame