def budget(self, type="byte", size=600):
        summary = []
        if size == "all":
            summary = self._df["sent text"].tolist()
        elif type == "word":
            remaining = size
            for idx, sent in self._df.iterrows():
                num_words = min(len(sent["words"]), remaining)
                summary.append(u" ".join(sent["words"][0 : num_words]))
                remaining -= num_words
                if remaining < 1:
                    break
        elif type == "byte":
            remaining = size
            for idx, sent in self._df.iterrows():
                num_chars = min(len(sent["sent text"]), remaining)
                print num_chars
                summary.append(sent["sent text"][0 : num_chars])
                remaining -= num_chars
                if 1 < remaining:
                    break
        return u"\n".join(textwrap.fill(u"{}) {}".format(i, sent))
                          for i, sent in enumerate(summary, 1)) + u" ..."
dataset/ETHPy150Open kedz/sumpy/sumpy/document.py/Summary.budget/swapped operands of `<`