code: def from_frame(cls, df, sortorder=None, names=None):
          if not isinstance(df, ABCDataFrame):
              raise TypeError("Input must be a DataFrame")
          column_names, columns = lzip(*df.iteritems())
          names = column_names if names is None else names
          return cls.from_arrays(columns, sortorder=sortorder, names=names)