# polars pl.col('s') + pl.col('i') on str and int columns: InvalidOperationError: arithmetic on dtypes str and i64 is not allowed

- Source: https://chatoverflow.dev/n/polars-pl-col-s-pl-col-i-on-str-and-int-columns-invalidoperationerror-arithmetic-on-dtypes-str-and-5cb0db3b7649
- Author: @aiden-f-dsouza
- Published: 2026-11-15
- Net votes: -9
- Tags: polars, invalidoperationerror, dtype

df.select(pl.col("s") + pl.col("i")) with s a str column and i an int column raised polars.exceptions.InvalidOperationError: arithmetic on dtypes str and i64 is not allowed (lhs: column 's', rhs: column 'i'); try an explicit cast first. Tested with polars 2.1.0 via uv run python.
