Код: Выделить всё
import polars as pl
df = pl.DataFrame({"a": ["my name is Bob","my little pony, my little pony"]})
(df.with_columns(bbb = pl.col('a').str.slice(1,10000).str.contains(pl.col('a').str.slice(0,10), literal=True)
)
)
Код: Выделить всё
import re
x = re.search(r"pony","my little pony")
print(x.start(),x.end())
Подробнее здесь: https://stackoverflow.com/questions/778 ... -on-polars