Skip to content

FAQ

Installation and authentication

ImportError asking you to install a package

The chosen provider needs its package, and the message says what to install. For LangChain providers, it suggests the provider's package and, when the package is in the all extra, all as well:

pip install langchain-anthropic
# or
pip install dataframeit[all]

The provider's extra, such as dataframeit[anthropic], installs the same package. all brings the providers that have an extra, except Codex; LangChain providers without their own extra, such as Cohere and Mistral, need the langchain-<provider> package, which all does not include, and the message suggests only that package. For claude_code and codex, the message asks for the provider's extra (dataframeit[claude-code], dataframeit[codex]), and for web search, the search provider's package. The extras are listed in Installation.

Authentication error (401 or 403)

The API key was not found or was rejected. Check the provider's environment variable (OPENAI_API_KEY, GOOGLE_API_KEY, ANTHROPIC_API_KEY, GROQ_API_KEY) in the same process that runs Python; in a notebook, set it before calling dataframeit(). An authentication error gets no new attempt: every row ends with status 'error'.

The codex and claude_code providers use the local authentication of those tools. codex rejects api_key with ProviderConfigurationError, and claude_code ignores it; see Providers.

Result

KeyError: '_dataframeit_status'

When no row fails and none records any detail, the status column and _error_details are removed from the output. Check that the column exists before filtering:

if '_dataframeit_status' in result.columns:
    errors = result[result['_dataframeit_status'] == 'error']

ValueError about the text column

Without text_column, dataframeit looks for the columns texto, text, decisao, content and content_text, in that order, or uses the DataFrame's only column. With several columns and none of these names, set the column:

result = dataframeit(df, Model, PROMPT, text_column='comment')

Some rows ended up with "Texto ausente"

Rows with empty or null text are not sent to the model. They get status 'error' and this detail, so that they do not pass as processed.

I ran it again and the rows with errors were not redone

With resume=True (default), only rows without status are processed. To redo the ones that failed, clear their status; see Reprocessing Errors.

The model columns already exist and nothing was processed

With resume=False and the status column in the DataFrame, if the model columns are already in it and reprocess_columns was not passed, dataframeit emits a warning and returns the data unprocessed, so as not to overwrite results. Use resume=True to continue, or reprocess_columns=[...] to redo specific columns.

ValueError because a column already exists with the name of a model field

When the input arrives without the status column and there is no checkpoint to read back, every row counts as new, and the model's answer would overwrite the input column that has the name of a field, such as a classification made by hand. dataframeit refuses the run before any call, with resume=True or resume=False; a column without any value, a column in reprocess_columns and the column of a field with exclude=True, which the run does not write, do not count, nor does the value in a row without text, which is not sent to the LLM. With the status column in the input, the refusal applies to the values in the rows without status, and when resuming from a checkpoint_path, to the values in the rows the checkpoint left pending. Rename or drop the column, or pass it in reprocess_columns to overwrite it on purpose. If the DataFrame is a dataframeit output, which comes without the status column when no row had an error, put the column back with df["_dataframeit_status"] = "processed" in pandas or df = df.with_columns(pl.lit("processed").alias("_dataframeit_status")) in polars (or the name passed in status_column): the run resumes from it, and reprocess_columns redoes only the columns listed.

Limits and costs

Many 429 errors (rate limit)

The provider rejected requests for exceeding its rate. dataframeit retries with backoff and, when the row fails after all attempts, halves the workers. With codex, the rate limit and the app-server overload are recognized by the error code or status, without reading the message; with claude_code, the rate limit (429) and the overload (529) are recognized by the status the SDK reports from claude-agent-sdk 0.1.76 on (from 0.1.48 to 0.1.75, without the status, they are retried as transient failures and do not reduce the workers); with the LangChain providers, the rate limit is recognized by the 429 status or the error class and, when the error carries neither, by the message text, and Anthropic's 529 overload counts as a rate limit. The stable fix is to lower parallel_requests or raise rate_limit_delay. The calculation is in Performance. With web search, the search provider's limit is usually the tightest; see Web Search.

How much will it cost?

Run a sample first (df.sample(30)) with track_tokens=True. The summary at the end of the run shows the tokens and, with search, the credits spent; multiply by the ratio between the dataset size and the sample size. Prices per model are in Providers.

A long run was interrupted

Use batch_size and checkpoint_path to save progress during the run, and resume by running the same call again, which continues from the file; see Checkpoints for Long Runs.

A Ctrl-C saves to the checkpoint the rows completed since the last save before stopping, and resuming does not call them again. The row whose call the Ctrl-C cut off and the ones the run had not reached yet end up as in the interruption by ProviderAbortError, in the DataFrame and in the checkpoint: without status, for resuming, including the 'error' row that resume=False was going to redo, or, with reprocess_columns, with the previous values and the mark in _error_details. With parallel_requests, the interruption waits for the calls in progress to finish, and they go into the save; a second Ctrl-C cuts that wait short, and the calls that did not finish stay pending.

The same holds for any exception that leaves dataframeit() in the middle of the rows, such as a warning treated as an error (python -W error): the exception reaches the caller, and the checkpoint is saved first, with the same marks. When the warning is the one for a row that failed, the row is already recorded as 'error', with its error, and resuming does not call it again.