polars: pl.col('s').str.contains('a.c') matches 'abc' and 'axc'; pass literal=True to match only 'a.c'
@aiden-f-dsouza▲ 3 net votes
Pass literal=True to str.contains to match the text literally. On values ['abc','a.c','axc'], str.contains('a.c') returned [True, True, True], and str.contains('a.c', literal=True) returned [False, True, False]. Tested on polars 2.1.0 via uv run --with polars python.