# The 🤗 Datasets library - Hugging Face Course

**URL:** </static-proxy?url=https%3A%2F%2Fdiscuss.huggingface.co%2Ft%2Fthe-datasets-library-hugging-face-course%2F12148%3E%5C
**Category:** 🤗Datasets\
**Created:** [November 22, 2021, 9:36am UTC](/static-proxy?url=https%3A%2F%2Fdiscuss.huggingface.co%2Ft%2Fthe-datasets-library-hugging-face-course%2F12148 "2021-11-22T09:36:50Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![Modfiededition](https://avatars.discourse-cdn.com/v4/letter/m/ce73a5/32.png) [@Modfiededition](/static-proxy?url=https%3A%2F%2Fdiscuss.huggingface.co%2Fu%2FModfiededition)%5C
**Post date:** [November 22, 2021, 9:36am UTC](/static-proxy?url=https%3A%2F%2Fdiscuss.huggingface.co%2Ft%2Fthe-datasets-library-hugging-face-course%2F12148%2F1 "2021-11-22T09:36:50Z")

</div>

> **[Time to slice and dice - Hugging Face Course](https://huggingface.co/course/chapter5/3?fw=tf)**
>
> We’re on a journey to advance and democratize artificial intelligence through open source and open science.

In the above link, I am not able to understand anything about the parameter: return\_overflowing\_tokens used in the tokenizer object and also what is this error message and why are we getting:

ArrowInvalid: Column 1 named condition expected length 1463 but got length 1000

---

<div class="post-metadata">

**Author:** ![lhoestq](https://sea2.discourse-cdn.com/hellohellohello/user_avatar/discuss.huggingface.co/lhoestq/32/64813_2.png) [@lhoestq](/static-proxy?url=https%3A%2F%2Fdiscuss.huggingface.co%2Fu%2Flhoestq)%5C
**Post date:** [November 25, 2021, 4:44pm UTC](/static-proxy?url=https%3A%2F%2Fdiscuss.huggingface.co%2Ft%2Fthe-datasets-library-hugging-face-course%2F12148%2F2 "2021-11-25T16:44:48Z")

</div>

Hi !

I think `return_overflowing_tokens ` can be used to keep the overflowing tokens in case an example is longer than `max_length`. For example for max\_length=4 and for an example consisting of 10 tokens:

- if `return_overflowing_tokens=False`, then the example is cropped and you get one list of 4 tokens
- if `return_overflowing_tokens=True`, then the example is split to lists of maximum 4 tokens, so you end up with three lists with length 4, 4 and 2.

The error

```auto
ArrowInvalid: Column 1 named condition expected length 1463 but got length 1000

```

means that there is a mismatch between the number of rows for `condition` and the other rows created by the tokenize function. Indeed from 1,000 examples, with each example having columns like `condition`, the tokenize function returned 1,463 tokenized texts. Because some columns have more rows than others, it can’t form a valid dataset table.

But since in the end you don’t care about the `columns` function at this point, you can just drop it and only keep the 1,463 tokenized texts with `remove_columns=drug_dataset["train"].column_names`

I hope that helps 🙂
